public static CityAccountListing MapFromObject(CityAccount cityAccount) { return(new CityAccountListing() { CityAccountId = cityAccount.CityAccountId, Name = cityAccount.Name }); }
public List <CityAccount> GetCityAccounts() { var cityAccounts = new List <CityAccount>(); foreach (var cityAccount in _accountRepository.GetCityAccounts()) { cityAccounts.Add(CityAccount.MapFromEntity(cityAccount)); } return(cityAccounts); }