コード例 #1
0
        public async Task <IActionResult> InsertarSeguimiento([FromBody] SeguimientoViajeItemDTO seguimiento)
        {
            try
            {
                await _mediator.Send(new InsertarSeguimientoVIajeItemCommand(seguimiento));

                return(Ok(new
                {
                    Ok = true,
                    Message = "El seguimiento se ha registrado exitosamente"
                }));
            }
            catch (Exception e)
            {
                return(BadRequest(new
                {
                    Ok = false,
                    Error = e.Message
                }));
            }
        }
コード例 #2
0
 public InsertarSeguimientoVIajeItemCommand(SeguimientoViajeItemDTO seguimiento)
 {
     this.Seguimiento = seguimiento;
 }