score:2
Accepted answer
Try to use Z.EntityFramework.Plus.EF6 library:
db.Item2.Where(x => x.TemplateID == idT).Delete();
Source: stackoverflow.com
Related Query
- Entity Framework (model-first) deleting multiple entries with same attribute
- map one to one with multiple primary key columns entity framework code first
- Deleting multiple records with Entity Framework using a single LINQ query
- Entity Framework Code First String Comparison with Oracle Db
- most efficient Entity Framework Code First method of flattening / projecting parent entity with specific child
- Multiple joins to the same table with the Entity Framework
- Entity Framework multiple optional relationships of same type with fluentapi
- Proper Linq Query for objects with many to many relation ship generated with code first entity framework
- Map extra column from stored procedure to Entity Framework code first model
- Entity Framework Core: many-to-many relationship with same entity
- Entity Framework 6 Code First Custom Functions
- Deleting an item with entity framework
- Entity Framework - An item with the same key has already been added. - Error when trying to define foreign key relationship
- Entity Framework Core where clause with multiple values
- Entity Framework Core LINQ query with multiple where clauses
- Dynamically Instantiate Model object in Entity Framework DB first by passing type as parameter
- Entity Framework Code First without app.config
- How to get Multiple Result Set in Entity Framework using Linq with C#?
- Select data from multiple unrelated tables with LINQ to Entity Framework
- Entity Framework Code First using context in Controller
- Update records with Entity Framework without loading in first
- many to many mapping in entity framework code first
- Does Entity Framework query the database multiple times if I use different fields of the same Linq query at different times?
- How to Create a Run-Time Computed (NotMapped) Value in Entity Framework Code First
- Join multiple entities, 2 DbSet with one List in Entity framework
- get attribute value from multiple elements with same name and attribute value of one other element in xml
- updating data in many-to-many relationship in entity framework in code first existing database
- Entity framework - select by multiple conditions in same column - referenced table
- create appropriate model with linq and entity framework
- Multiple outer join using Linq with 2 joins to the same table/object. Got the SQL, need the Linq to Entity
More Query from same tag
- Delete duplicates in a List of int arrays
- Get selected records in linq union from two different tables
- Use of unassigned variable?
- Updating tables with Linq expressions
- Linq to return summed values from differing datatable
- SQL inner select to LINQ
- LINQ Sum method error
- How to sort a List of Lists of integers?
- query in Asp.net mvc5
- Is there a way to return only the function calls that do not throw exceptions with LINQ?
- Combining two streams of numbers using linq or rx
- Linq grouping by nullable datetime and using this as criteria
- Why does "SingleOrDefault" return null on second execution when there is data in DB?
- The Fruit Basket, how to use Linq to view from the basket or the fruit's perspective?
- what is equivalent c# code for following statement?
- select from list which has same code
- Flag intersection of two lists using LINQ
- Using LINQ to search two lists for match and return boolean for every item
- Sort Linq result in alphabetical order
- Version of iteration which takes "groups" of elements
- c# Elements of elements using XElement
- Problem transforming dictionary with Linq
- How to group by on result of LINQ group by
- Grouping and multiple orderings using Linq to Entities
- Unflattening a data structure with LINQ
- Expression.Lambda<Func<T,bool>> Says 'T' could not be found
- How to make linq master detail query for 0..n relationship?
- how to get max id from a table using linq
- Linq equivalient to JavaScript's join?
- What is the correct way to use Linq to reference the table you instantiate with your ViewModel as a list to generate a list of 'SelectListItems'?