コード例 #1
0
        public JsonResult Purchase([FromBody] int clothingItemId)
        {
            var clothingStoreBL = new ClothingStoreBL();
            var data            = "Success";

            try
            {
                clothingStoreBL.Purchase(clothingItemId);
            }
            catch (Exception ex)
            {
                data = ex.Message;
            }

            return(new JsonResult()
            {
                Data = data,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet,
            });
        }