コード例 #1
0
        public async Task <Result> ExecuteAsync(Command command)
        {
            var flightId = FlightId.New();
            var events   = Flight.Create(flightId, command.FromAirport, command.ToAirport, command.DepartureTime, command.ArrivalTime);
            await store.CreateStreamAsync(flightId, events);

            return(new Result.Success(flightId));
        }