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}")); }
public async Task <IActionResult> CreatePassenger([FromBody] CreatePassengerCommand command) => Ok((await m_Mediator.Send(command)));