예제 #1
0
        public async Task <IActionResult> FormCreateAsync(
            [FromForm] string playerId,
            [FromForm] string title,
            [FromForm] int rounds)
        {
            var gameId = Guid.NewGuid();
            await module.DispatchAsync(new CreateGame {
                GameId   = Guid.NewGuid(),
                PlayerId = playerId,
                Title    = title,
                Rounds   = rounds
            });

            logger.LogInformation("Game Created - {gameId}", gameId);
            return(base.Redirect($"/games"));
        }