/// <summary> /// Convert a WCF Game object into a Game Entity object /// </summary> /// <param name="game"></param> /// <returns></returns> private Game WCFToGame(GameWcf game) { Game ret = new Game(); ret.ID = game.ID; ret.IP = game.IP; ret.NumOfUsers = game.numOfPlayers; ret.FirstUser = game.FirstUser; ret.SecondUser = game.SecondUser; return ret; }
/// <summary> /// convert a Game Entity object to a WCF Game object /// </summary> /// <param name="game"></param> /// <returns></returns> private GameWcf gameToWCF(Game game){ GameWcf ret = new GameWcf(); ret.ID = game.ID; ret.IP = game.IP; ret.numOfPlayers = game.NumOfUsers; ret.FirstUser = game.FirstUser; ret.SecondUser = game.SecondUser; return ret; }