public async Task <Player> Create(NewPlayer nPlaya)
        {
            Player p = new Player(Guid.NewGuid(), nPlaya.Name)
            {
                Lvl = nPlaya.Lvl
            };

            return(await repo.Create(p));
        }
Exemple #2
0
        public async Task <int> Create(Player player)
        {
            var newId = await _repository.Create(player);

            return(newId);
        }
        public ActionResult Register(Guid playerId)
        {
            var player = _playersRepository.Create(playerId);

            return(player.Register() ? Ok() : BadRequest("Wallet already created."));
        }