What is the most effective way to delete entites that satisfy a condition from a database?
问题 AFAIK, there isn't a direct way to delete entities using a predicate such as DbSet.RemoveWhere(() => {}) I tried a few ways to delete and don't know which is the most efficient way to do it. Could you point me in the right direction? The first and most basic thing I tried is: _context.Users.RemoveRange(_context.Users.Where(u => u.Name.Equals("John"))); which loads the user to the memory before deletion. I don't like this approach. The second way I tried is using the Z.EntityFramework.Plus