public async Task <UpdateAgencyViewModel> GetUpdateAgency(int id) { var agency = await _agencyRepository.GetByIdAsync(id); if (agency != null) { return(new UpdateAgencyViewModel(agency)); } return(null); }
public async Task <AgencyViewModel> GetAgencyById(int id) { var agency = await _agencyRepository.GetByIdAsync(id); return(GetAgencyViewModel(agency)); }