public Task <bool> UpdateArea(AreaDto request) { ValidationFields(request); var updateArea = _areaRepo .SearchMatching <AreaEntity>(d => d.AreaId == request.AreaId).FirstOrDefault(); var response = _areaRepo.Update(_mapper.Map <AreaEntity>(updateArea)); return(Task.FromResult(response)); }
public Task <bool> Update(AreaRequestDto requestDto) { ValidationDto(requestDto); var entity = ValidationEntity(requestDto); if (!string.IsNullOrEmpty(requestDto.NombreArea)) { entity.NombreArea = requestDto.NombreArea; } entity.EmpleadoResponsableId = requestDto.EmpleadoResponsableId; return(_areaRepositorio.Update(entity)); }