public virtual void InsertOrUpdate(params TEntity[] entities) { foreach (var entity in entities) { _dbContext.AddOrUpdate(entity); _dbContext.SaveChanges(); } }