How can I use Entity Framework 6 and my repository to delete multiple records?
问题 I am using Entity Framework 6 and I have a repository looking like the following with the Add and Update methods removed to make it shorter: public class GenericRepository<T> : IRepository<T> where T : class { public GenericRepository(DbContext dbContext) { if (dbContext == null) throw new ArgumentNullException("An instance of DbContext is required to use this repository", "context"); DbContext = dbContext; DbSet = DbContext.Set<T>(); } protected DbContext DbContext { get; set; } protected