Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
public class Person { int Id{get;set;} string Name{get;set;} }
并将 Id 设置为 Itentity Feed
ARMSEntity _entities=new ARMSEntity(); _entities.AddObject('Person',obj);
现在我想获取插入数据库的当前 ID。
感谢您提前提供任何帮助
using (var context = new MyContext()) { context.MyEntities.AddObject(myNewObject); context.SaveChanges();
当您找到身份种子值时,请尝试..
int id = myNewObject.Id; }