I have a table with the primary key as the identity column. I’m doing an insert with linq-to-sql and I was wondering if there’s a way to return the ID of the row that was inserted and how we know for sure that the insert happened.
Thanks for your suggestions.
The primary key property of the entity that was used for the insert will be updated after the call to SubmitChanges with the ID from the database.
Ex: