I add new rows to the table using code like
Code: Select all
using (var entities = new MyEntityModel())
{
entities.MyMessageTable.AddObject(message);
insertResult = entities.SaveChanges();
}
How do I do this? There are various posts on this forum asking similar questions, but none that I can find that use the entity model approach described here.
Essentially, I am looking for equivalant tothis post on MSDN entitled
"How to acquire the ID of last row inserted using Entity Framework"