コード例 #1
0
 public Product MapFrom(ProductInfo info)
 {
     return new Product
            {
                ProductId = int.Parse(info.ProductId, CultureInfo.InvariantCulture),
                Name = info.Name,
                Description = info.Description,
                Category = info.Category,
                Color = info.Color,
                ListPrice = decimal.Parse(info.ListPrice, CultureInfo.InvariantCulture),
                ProductModel = info.ProductModel,
                ProductNumber = info.ProductNumber,
                Subcategory = info.Subcategory
            };
 }
コード例 #2
0
 public Task UpdateAsync(ProductInfo document)
 {
     var action = new IndexAction<ProductInfo>(IndexActionType.MergeOrUpload, document);
     return indexClient.Documents.IndexAsync(IndexBatch.Create(action));
 }