public void BulkInsert(List <TEntity> entities) { using (var db = new NewPlayDbContext()){ db.AddRange(entities); db.SaveChanges(); }; }
public void Remove(TEntity entity) { using (var db = new NewPlayDbContext()){ db.Remove(entity); db.SaveChanges(); }; }