public virtual Pricelist ToPricelist(pricingDto.Pricelist pricelistDto, IEnumerable <Currency> availCurrencies, Language language) { var currency = availCurrencies.FirstOrDefault(x => x.Equals(pricelistDto.Currency)) ?? new Currency(language, pricelistDto.Currency); var result = ServiceLocator.Current.GetInstance <PricingFactory>().CreatePricelist(currency); result.Id = pricelistDto.Id; return(result); }
public virtual Pricelist ToPricelist(pricingDto.Pricelist pricelistDto, IEnumerable <Currency> availCurrencies, Language language) { var currency = availCurrencies.FirstOrDefault(x => x.Equals(pricelistDto.Currency)) ?? new Currency(language, pricelistDto.Currency); var result = new Pricelist(currency); result.Id = pricelistDto.Id; return(result); }
public static Pricelist ToPricelist(this pricingDto.Pricelist pricelistDto, IEnumerable <Currency> availCurrencies, Language language) { return(PricingConverterInstance.ToPricelist(pricelistDto, availCurrencies, language)); }