Barista.Service.Controllers.OrderController.Post C# (CSharp) Method

Post() private method

private Post ( System.Guid id, CompletePreparationCommand cmd ) : IHttpActionResult
id System.Guid
cmd Barista.Service.DataTransferObjects.Commands.CompletePreparationCommand
return IHttpActionResult
        public IHttpActionResult Post(Guid id, CompletePreparationCommand cmd)
        {
            try
            {
                var command = new CompleteOrder(id, cmd.Version);
                handler.Handle(command);

                return Ok();
            }
            catch (AggregateNotFoundException)
            {
                return NotFound();
            }
            catch (AggregateDeletedException)
            {
                return Conflict();
            }
        }