private AgencyView GetAgencyView(string id) { GetRequest request = new GetRequest(); request.ID = Guid.Parse(id); GetAgencyResponse response = this._agencyService.GetAgency(request); return(response.AgencyView); }
public GetAgencyResponse GetAgency(GetRequest request) { GetAgencyResponse response = new GetAgencyResponse(); try { Agency agency = new Agency(); AgencyView agencyView = agency.ConvertToAgencyView(); agency = _agencyRepository.FindBy(request.ID); if (agency != null) { agencyView = agency.ConvertToAgencyView(); } response.AgencyView = agencyView; } catch (Exception ex) { } return(response); }