public Task <Player> Create(NewPlayer player) { Player newPlayer = new Player(); newPlayer.Name = player.Name; newPlayer.Id = Guid.NewGuid(); newPlayer.Tag = player.Tag; newPlayer.CreationTime = System.DateTime.Now; newPlayer.Level = player.Level; newPlayer.items = new List <Item>(); return(_repository.CreatePlayer(newPlayer)); }
public Task <Player> Create([FromBody] NewPlayer player) { return(_processor.Create(player)); }