Esempio n. 1
0
        public IActionResult Get(JObject data)
        {
            Order order = JsonConvert.DeserializeObject <Order>(data.ToString());

            order.orderId = Guid.NewGuid().ToString();

            return(OrderUtils.WriteOrder(order) ? (ActionResult) new OkObjectResult("Order Added") :
                   new BadRequestObjectResult("Error when adding new order"));
        }