Batch deletion in the O/R Mapping frameworks is always depressing. We need to query all the entities we want to delete from the database, pass them to the DeleteOnSubmit or DeleteAllOnSubmit methods of DataContext, and finally invoke SubmitChanges to delete the records form database. In this case, we...
Posted to
Happy Coding
(Weblog)
by
JeffreyZhao
on
03-06-2008, 12:00 AM
Filed under: Lambda Expression, Batch Deletion, Expression Tree, LINQ, C#, .NET, LINQ to SQL