Get Last ID From The table [ Entity Framework ]
Could someone guide me on this. I am using EntityFramwork4 , I want 开发者_如何学JAVAto get the ID of the last row of a table. Could someone having experience using this tell me , how can i get the last id from a database table.
Relational databases have no intrinsic order. There is no such thing as "the last row." Even if there were, multiuser concurrency would make this meaningless.
Max(id)
probably doesn't solve your issue due to concurrency. But since you haven't told us what the real problem you're trying to solve is, it's hard to be sure.
精彩评论