コード例 #1
0
        public void Update(Product product)
        {
            var p = this.GetByID(product.PartitionKey, product.RowKey);

            p.Name = product.Name;
            p.Price = product.Price;
            p.Category = product.Category;
            this.context.UpdateObject(p);
        }
コード例 #2
0
 public ActionResult Create(Product product)
 {
     if (ModelState.IsValid) {
         productRepository.Create(product);
         productRepository.SaveChanges();
         return RedirectToAction("Index");
     } else {
         return View();
     }
 }
コード例 #3
0
 public void Delete(Product product)
 {
     this.context.DeleteObject(product);
 }
コード例 #4
0
 public void Create(Product product)
 {
     this.context.AddObject(this.context.TableName, product);
 }