This question is locked. New answers and comments are not allowed.
Hi guys,
I'm starting to work with the OpenAccess and MySql but I meet some issues. Hope you can help.
For my needs I began with that tutorial : How to: Map CUD Operations to Stored Procedures
Then, in my model I have two entites (tables) which are linked to (CUD) stored procedures.
After that operation, I updated my database from the model and ran the script. However, I altered the stored procedures in order to de other treatments than expected (of CUD operations).
For example, I replaced the original content by an other :
Now, in C# code, I wanted to manipulate my related objects and my first goal is to add a new object.
Does it exist a solution to fill the id (coming from 'teleriktable') of my object after the savechanges ?
Maybe I will have other questions if this is possible.
Thanks for your help.
I'm starting to work with the OpenAccess and MySql but I meet some issues. Hope you can help.
For my needs I began with that tutorial : How to: Map CUD Operations to Stored Procedures
Then, in my model I have two entites (tables) which are linked to (CUD) stored procedures.
After that operation, I updated my database from the model and ran the script. However, I altered the stored procedures in order to de other treatments than expected (of CUD operations).
For example, I replaced the original content by an other :
CREATE DEFINER=`root`@`%` PROCEDURE `sp_oa_ins_Viewtablestored`( OUT RowsAffected INTEGER, IN IdTable INTEGER, IN IdProc INTEGER, IN Description VARCHAR(255), IN Application VARCHAR(255) )BEGIN -- INSERT INTO `Viewtablestored` ( `IdTable` , `IdProc` , `Description` , `Application` ) VALUES ( IdTable , IdProc , Description , Application ) ; INSERT INTO `teleriktable` (`Application`,`CreationDate`) VALUES (Application, CURDATE()); INSERT INTO `telerikstoredproc` (`IdTable`,`Description`) VALUES (LAST_INSERT_ID(), Description); SET RowsAffected = ROW_COUNT();END$$Now, in C# code, I wanted to manipulate my related objects and my first goal is to add a new object.
OpenAccessTest.EntitiesModel em = new OpenAccessTest.EntitiesModel();OpenAccessTest.Viewtablestored vts = new OpenAccessTest.Viewtablestored();vts.Application = "Ajout46";vts.Description = "MyDesc46";em.Add(vts);em.SaveChanges();Does it exist a solution to fill the id (coming from 'teleriktable') of my object after the savechanges ?
Maybe I will have other questions if this is possible.
Thanks for your help.
