Showing posts with label how to delete multiple records at one time using Linq. Show all posts
Showing posts with label how to delete multiple records at one time using Linq. Show all posts

Select and Delete multiple rows using Linq

Here am using two line statement to select multiple rows and delete the same in proper way.

 var result = Context.tablename.Where(data => data.fk_applicantID== 21);
 Context.tablename.DeleteAllOnSubmit(result);

Context is the instance of Linq Data Context .

small things may help lot. 

----------------------------------------------------------------------------- 

Additionally want to know this: Garbage Collection


CONVERT VS TRY_CONVERT IN SQL 2012