예제 #1
0
 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
         };
 }
예제 #2
0
 private Uri GetProductUrl(ScoredProduct scoredProduct)
 {
     return string.IsNullOrEmpty(scoredProduct.Product.ProductUrl) ? null : new Uri(_platformSettings.SywWebSiteUrl, scoredProduct.Product.ProductUrl);
 }