3
Entity and LINQ usage. I would like to know how I get a generated ID right after entering a record, before anyone else can enter it as well, that is, ensure that that ID is the one generated by me. Do you have how? Sql Server Usage 2008, Entity, LINQ
Gypsy understood, but another person could have given an Internet too and I get the ID generated last and not what I generated. No sql server has a function that does this, IE, ensures that the generated ID is that and ready. I just don’t know which
– pnet
So, but forget about it in the Entity Framework. It already takes the
scope_identity
automatically.– Leonel Sanches da Silva
@pnet, the Entity framework already takes exactly the generated ID and puts it in the ID attribute of your Model, as Gypsy said.
– Tiago César Oliveira