private ScoredProductModel ToModel(ScoredProduct scoredProduct) { return new ScoredProductModel { Id = scoredProduct.Product.Id, Name = scoredProduct.Product.Name, ImageUrl = scoredProduct.Product.ImageUrl, ProductUrl = GetProductUrl(scoredProduct), Price = scoredProduct.Product.Price, Score = scoredProduct.Score }; }
private Uri GetProductUrl(ScoredProduct scoredProduct) { return string.IsNullOrEmpty(scoredProduct.Product.ProductUrl) ? null : new Uri(_platformSettings.SywWebSiteUrl, scoredProduct.Product.ProductUrl); }