示例#1
0
        public async Task <UpdateAgencyViewModel> GetUpdateAgency(int id)
        {
            var agency = await _agencyRepository.GetByIdAsync(id);

            if (agency != null)
            {
                return(new UpdateAgencyViewModel(agency));
            }
            return(null);
        }
示例#2
0
        public async Task <AgencyViewModel> GetAgencyById(int id)
        {
            var agency = await _agencyRepository.GetByIdAsync(id);

            return(GetAgencyViewModel(agency));
        }