EF6 - Is there a way to clear EF cache / Local items without causing any change into the database?
问题 Basically I am mixing EF with one call to a stored procedure which does some batch deletions, otherwise EF is too slow. Here is some pseudo-code of this scenario (I have more complex code in reality): public void RemoveCustomer(int customerUID) { // this code is running in one db transaction { // retrieve certain orders of particular customer using EF var orders = repoOrders.GetOrdersOfCustomer(filter, customerUID); // do something with above orders before deletion using EF repoX