Пример #1
0
        public async Task Handle(AddShip command)
        {
            var aggregateGame = await _store.GetById <Game>(command.GameId);

            if (aggregateGame.AddShip(command.ShipDetails, command.PlayerIndex))
            {
                // ship was added, persist aggregate
                await _store.Save(aggregateGame, aggregateGame.Version);
            }
        }
 public async Task Handle(AddShip command)
 {
     await Command.Save(command);
 }