public Task <Player> Create(NewPlayer player) { Player tempplayer = new Player(); tempplayer.Name = player.Name; tempplayer.Id = Guid.NewGuid(); tempplayer.Score = 0; tempplayer.Level = player.Level; tempplayer.IsBanned = false; tempplayer.CreationTime = DateTime.Now; tempplayer.Items = new List <Item>(); return(_repository.Create(tempplayer)); }
public Task <Player> Create([FromBody] NewPlayer player) { // Console.WriteLine(player.Name); return(_processor.Create(player)); }