public ActionResult <CompanyReadDto> GetCompanyById(Guid id) { var companyItem = _repository.GetCompanyById(id); // If found, return Model mapped as DTO object if (companyItem != null) { return(Ok(_mapper.Map <CompanyReadDto>(companyItem))); } return(NotFound()); }
private bool companyExists(Guid companyId) { var checkCompanyId = _companyrepository.GetCompanyById(companyId); if (checkCompanyId == null) { return(false); } return(true); }