score:3
Accepted answer
The short answer is: you can't.
You can do something like:
var q = from account in dataContext.Accounts
where account.amount < 1000
select account;
dataContext.DeleteAllOnSubmit(q);
But, because the framework needs to track concurrency issues it will always execute separate deletes (so if you have 500 rows that would be deleted, it will send 500 delete statements)
For a longer version and a solution see: http://www.aneyfamily.com/terryandann/post/2008/04/Batch-Updates-and-Deletes-with-LINQ-to-SQL.aspx
Source: stackoverflow.com
Related Articles
- Multiple deletions using LINQ (more specifically Linq2Nhibernate, but...)
- How to reuse a linq expression for 'Where' when using multiple source tables
- How can I write the following code more elegantly using LINQ query syntax?
- Is there a more compact/better way to ZIP multiple lists using LINQ in C#?
- LINQ using multiple .join extensions with multiple (4) or more tables
- Convert string[] to int[] in one line of code using LINQ
- how to update the multiple rows at a time using linq to sql?
- How to select multiple values from a Dictionary using Linq as simple as possible
- linq to sql join on multiple columns using lambda
- Using LINQ to find duplicates across multiple properties
- Using LINQ to group by multiple properties and sum
- Using Linq to do a Contains with multiple values
- using Linq with multiple where conditions
- how to group by multiple columns using linq
- How do I remove items from generic list, based on multiple conditions and using linq
- Deleting multiple records with Entity Framework using a single LINQ query
- Select Multiple elements in a row using Linq
- Multiple SUM using LINQ
- Multiple tables left join using Linq
- Does this LINQ code perform multiple lookups on the original data?
- How to combine multiple fields into one field using LINQ
- c # using linq to group by multiple columns in a datatable
- Interleaving multiple (more than 2) irregular lists using LINQ
- Linq - Using array in Lambda expression to fetch multiple records
- Left outer join using LINQ -- understanding the code
- How to consolidate results from multiple IEnumerable<T> using LINQ
- Avoiding code repetition when using LINQ
- What is the purpose of using "Select" multiple times in this LINQ query?
- join multiple IEnumerable<> using Linq
- LINQ: How to do JOIN using the linq extension method style on multiple fields?
- How to convert sql query to linq query
- Parallel search in 2 collection
- How can I create a data set with filler rows in linq?
- Getting object with max date time value in one of it's properties
- How to write sub queries using Linq extension methods with EF 6
- Dynamic LINQ. No property or field 'FieldName' exists in type 'ClassName'
- Combine Aggregate functions over multiple tables using Entity Framework
- IGrouping does not contain a definition for
- How can I improve LINQ?
- how to get records from db having one common column values with another list?
- RavenDB OrderByDescending and Take - Incorrect Results
- Is there a way to simplify many joins over multiple fields in ef core?
- Loop through XML with XmlDocument
- Invalid parameter size value -1
- LINQ pivot on a single field
- Is Not Equal in linq in c#
- Can I check a property on a generic object by passing in a lambda expression to get the parameter?
- How to JOIN strings efficiently in linq?
- how to extract Datatable or DataSet from Linq Query or List
- Convert.ChangeType to produce an array of concrete type elements, not objects