internal static Timezone FromDto(NameValueDto dto) { return(new Timezone { Name = dto.Name, Value = dto.Value }); }
/// <summary> /// Get TaxRecovery /// </summary> /// <returns></returns> public async Task <List <NameValueDto> > GetTaxRecovery() { var accounts = await(from valuetaxrecovery in _valueAddedTaxRecoveryUnitRepository.GetAll() join taxtype in _valueAddedTaxTypeUnitRepository.GetAll() on valuetaxrecovery.ValueAddedTaxTypeId equals taxtype.Id //join typeofcountry in _typeOfCountryUnitRepository.GetAll() on taxtype.TypeOfCountryId equals typeofcountry.Id join country in _countryUnitRepository.GetAll() on taxtype.CountryID equals country.Id select new { valuetaxrecovery }).ToListAsync(); return(accounts.Select( result => { NameValueDto dto = new NameValueDto(); dto.Name = result.valuetaxrecovery.TypeOfVatRecoveryId.ToDisplayName(); dto.Value = result.valuetaxrecovery.Id.ToString(); return dto; }).ToList()); }