Ejemplo n.º 1
0
        public async Task <Player> Create(NewPlayer newPlayer)
        {
            var player = new Player()
            {
                Id   = Guid.NewGuid(),
                Name = newPlayer.Name
            };
            await _repository.Create(player);

            return(player);
        }
//        [ValidateModel]
        public Task <Player> Create(NewPlayer newPlayer)
        {
            // _logger.LogInformation("Creating player with name " + newPlayer.Name);
            return(_playerProcessor.Create(newPlayer));
        }