public Task <Player> Create(NewPlayer player) { Player p = new Player(); p.Name = player.Name; p.Id = Guid.NewGuid(); p.CreationTime = DateTime.Now; return(repo.Create(p)); }
public Task <Player> CreatePlayer(NewPlayer player) { Player forward = new Player(); forward.Name = player.Name; forward.Level = 1; forward.CreationTime = DateTime.Now; forward.IsBanned = false; forward.Score = 0; forward.Id = Guid.NewGuid(); return(repository.CreatePlayer(forward)); }
public Task <Player> CreatePlayer([FromBody] NewPlayer player) { return(processor.CreatePlayer(player)); }