Lifeng-Liang/DbEntry

Is there a convenient way to get IDENTITY key ID which I insert just now?

Closed this issue · 4 comments

Is there a convenient way to get IDENTITY key ID which I insert just now?
var user = new User{Name = "tom", Age = 18); // now user.Id == 0
user.Save(); // now user.Id == the key id you just insert.

var user = new User{Name = "tom", Age = 18); // now user.Id == 0
DbEntry.Insert(user );now user.Id == the key id I just insert?

this feature only works for the model inherits from DbObjectModel.