mysql - Get last auto inserted ID in identity column from DB Using Entity Framework -


I am using the code to get the newly entered ID in the Auto-identity column from the database. Using

  (TESTNTS institutions = new testtyte) {T2T2 = new T2 (); T2.Value = "Some Value"; Entities.AddToT2 (T2); Entities.SaveChanges (); Console.WriteLine (t2.id); }   

When I add my application to MS SQL, then it is working fine, but if I'm connected with MyScall, it always returns 0 (zero).

How to get the last entered ID to use another Entity Framework?

Thank you ...

Retrieving record IDs after SaveChanges I had to change the identity system. I am using Visual Studio 2010 and Tele-Open Asset ORM.

Open the unit model diagram in Visual Studio. Right-click on the interest table and select Properties. The identification mechanism property is set in database serverclub.

Comments