0
我在EF中有一张表,其中Id
列是PK和Auto_Increment
。我用这个代码中插入一行到表:是否可以实现通过EF添加插入行的ID
Cut newCut = new Cut()
{
Name = name,
Comments = comments
};
context.Cuts.AddObject(newCut);
context.SaveChanges();
可以实现添加的行的Id
没有其他查询?
请原谅我这个初学者问题。 – 2013-04-04 10:31:17