public IActionResult GetBaseRenovationsById(int baseRenovationId) { try { BaseRenovation baseRenovation = _renovationService.GetRenovationById(baseRenovationId); return(Ok(BaseRenovationMapper.BaseRenovationToBaseRenovationDTO(baseRenovation))); } catch (Exception e) { return(NotFound(e.Message)); } }
public ActionResult AddBaseRenovation(BaseRenovationDTO baseRenovationDTO) { BaseRenovation addedBaseRenovation = _renovationService.AddBaseRenovation(BaseRenovationMapper.BaseRenovationDTOToBaseRenovation(baseRenovationDTO)); if (addedBaseRenovation == null) { return(NotFound("NotFound")); } return(Ok()); }