Beispiel #1
0
        public async Task <IActionResult> InsertOrder([FromBody] InsertOrdenEntregaCommand ordenEntregaCommand)
        {
            try
            {
                await _mediator.Send(ordenEntregaCommand);

                return(Ok());
            }
            catch (Exception ex)
            {
            }
            return(BadRequest());
        }
Beispiel #2
0
        public async Task <IActionResult> InsertOrder([FromBody] InsertOrdenEntregaCommand ordenEntregaCommand)
        {
            try
            {
                await _mediator.Send(ordenEntregaCommand);

                return(Ok(new
                {
                    Ok = true,
                    Message = "Registro insertado exitosamente"
                }));
            }
            catch (Exception e)
            {
                return(BadRequest(new
                {
                    Ok = false,
                    Error = e.Message
                }));
            }
        }