I need to get id of newly created record form mssql. I read some information and still unclear. It says I can just do the following:
using (var context = new MyContext())
{
context.MyEntities.AddObject(myNewObject);
context.SaveChanges();
int id = myNewObject.Id; // Yes it's here
}
Is it enough?