You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
leap-hit-server/code/server/ApiLeapHit/Mapper/GameWithIdPlayerMapper.cs

20 lines
492 B

using DataBase.Entity;
using DTO;
namespace ApiLeapHit.Mapper
{
public static class GameWithIdPlayerMapper
{
public static Game ToGame(this DTOGameWithIdPlayer dtoGame, Player winner, Player loser)
{
return new Game
{
durationGame = dtoGame.durationGame,
nbMaxEchanges = dtoGame.nbMaxEchanges,
winner = winner.playerId,
loser = loser.playerId
};
}
}
}