示例#1
0
 public static Passenger Map(this CreatePassengerCommand command)
 {
     return(new Passenger()
     {
         Name = command.Name,
         FlightId = command.FlightId,
         Status = PassengerStatus.CheckedIn
     });
 }
        public async Task <IActionResult> CreatePassenger([FromBody] CreatePassengerCommand command)
        {
            await Send(command);

            return(Ok($"Create passenger with userId: {command.UserId}"));
        }
示例#3
0
 public async Task <IActionResult> CreatePassenger([FromBody] CreatePassengerCommand command)
 => Ok((await m_Mediator.Send(command)));