Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
// DELETE all customers that are inactive for more than two years
context.Customers
.Where(x => x.LastLogin < DateTime.Now.AddYears(-2))
.DeleteFromQuery();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment