Entity Framework composite key delete with one primary key

c# entity-framework-6 repository-pattern

Popular Answer

Use the RemoveRange function if you're running EF 6.

Consequently, it may resemble this;

context.Cart.RemoveRange(cartItem => cartItem.CustomerID == CustomerToDelete);
1
4/12/2017 12:57:39 PM


Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow