Community

Linq to SQL: Delete an entity using Primary Key only

(Omar AL Zabir) Linq to Sql does not come with a function like .Delete(ID) which allows you to delete an entity using its primary key. You have to first get the object that you want to delete and then call .DeleteOnSubmit(obj) to queue it for delete. Then you have to call DataContext.SubmitChanges()

Read More - Register for Free Membership