コード例 #1
0
        // PUT api/values/5
        public ValidationResult_OSC Put([FromBody]OnlineShoppingCart.Model.Models.Product product)
        {
            var result = new ValidationResult_OSC();
            ValidationHelper validationHelper = new ValidationHelper(ref result, ModelState);

            if (result.Success)
            {
                Product productDAL = new Product();
                result = productDAL.EditProduct(product);
            }
            return result;
        }
コード例 #2
0
 public Result<OnlineShoppingCart.Model.Models.Product> Get(int id)
 {
     Product product = new Product();
     return product.GetProduct(id);
 }
コード例 #3
0
 public Result<List<OnlineShoppingCart.Model.Models.Product>> Get([FromBody]OnlineShoppingCart.Model.Models.Product product)
 {
     Product productDAL = new Product();
     return productDAL.GetProductList(product);
 }
コード例 #4
0
 // DELETE api/values/5
 public ValidationResult_OSC Delete(int id)
 {
     Product productDAL = new Product();
     return productDAL.DeletProduct(id);
 }