public async Task UpdateRoleAsync(RoleDto model) { try { var dbEntity = await _roleRepository.FindAsync(model.RoleId); dbEntity = model.PatchEntity(dbEntity, _mapper); _roleRepository.Update(dbEntity); await _unitOfWork.SaveChangesAsync(); } catch (Exception ex) { _logger.LogError(ex, ex.Message); throw ex; } }