I have something like this:
var dbTransactions = context.Transactions.Where(t => t.Date >= yesterday).Select(t => t).ToList();
Now, i would like to remove objects from dbTransactions
list, but not from the actual database. Later on i am calling context.SaveChanges()
and if i would do that, it would erase rows from my db. How can i disable changes tracking for dbTransactions
?