public virtual async Task UpdateAsync(T entity) { _dbContext.Update(entity); try { await _dbContext.SaveChangesAsync(); } catch (DbUpdateException due) { _logger.LogError(due.Message, due.InnerException); throw; } }