tags:

views:

25

answers:

1

Are they assigned at SubmitChanges? or when a new object is created? If the latter, I would imagine there would be collisons?

+1  A: 

If the id field is an autogenerated (identity/guid) field, the id is assigned when the record is inserted into the database. LINQToSQL does a select after insert to get the assigned value and updates it in the object. There are no collisions using identity columns as long as you don't turn on allow identity insert. If the id is not autogenerated, then you will be responsible for creating the id and ensuring that there aren't collisions.

tvanfosson