Пример #1
0
 public bool ChangeQuantity([FromBody] OrderDetailDTO data)
 {
     try
     {
         var identity = (ClaimsIdentity)User.Identity;
         var name     = identity.Claims.Where(x => x.Type == ClaimTypes.Name).Single().Value;
         if (data.Quantity > _product.GetQuantity(data.ProductID))
         {
             return(false);
         }
         return(_business.ChangeQuantity(data, name));
     }
     catch
     {
         return(false);
     }
 }