Exemplo n.º 1
0
        public IHttpActionResult Create([FromBody] WishroundProject.API.Objects.Wish wish)
        {
            OrderAccess oAccess  = new OrderAccess();
            var         newOrder = oAccess.CreateForWish(wish.wishId);

            if (newOrder != null)
            {
                return(Ok <WishroundProject.API.Objects.Order>(new Objects.Order {
                    orderId = newOrder.PublicId
                }));
            }
            else
            {
                return(BadRequest("Wish not found"));
            }
        }