Beispiel #1
0
        public IActionResult Create([FromBody] Order order)
        {
            if (order == null)
            {
                return(BadRequest());
            }

            var newBindingID = Guid.NewGuid();

            var temp = JsonConvert.SerializeObject(order);

            _service.SmartContract2Async(temp, newBindingID.ToString());

            var _simulatedDeployConfirmation = prepareDeployObject(newBindingID.ToString(), order);

            _txAgent.LogTransaction(_simulatedDeployConfirmation);

            Request.HttpContext.Response.Headers.Add("Access-Control-Allow-Origin", "*");

            return(CreatedAtRoute("GetOrder", new { id = newBindingID }, order));
        }