예제 #1
0
 public IHttpActionResult CancelOrder(int id)
 {
     try
     {
         var identity = (ClaimsIdentity)User.Identity;
         var name     = identity.Claims.Where(x => x.Type == ClaimTypes.Name).Single().Value;
         return(Ok(_business.CancelOrder(id, name)));
     }
     catch
     {
         return(BadRequest());
     }
 }