public async Task <Player> Create(NewPlayer nPlaya) { Player p = new Player(Guid.NewGuid(), nPlaya.Name) { Lvl = nPlaya.Lvl }; return(await repo.Create(p)); }
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.")); }