October 2010
Intermediate to advanced
1920 pages
73h 55m
English
You can delete an entity with LINQ to SQL by using code like the following:

This code starts by retrieving the record with an Id of 1 from the Movie database table. Next, the Movie entity is removed from the Movies collection. Finally, this change is submitted to the database and the following SQL command executes:
![]()
I’m assuming in this section that you have added a Version property to your Movie database table. If not, see the previous section, because you should add a Version property when deleting for the same ...