/// <summary> /// checks if a game is owned by user /// </summary> /// <param name="gameId">id of game</param> /// <param name="userId">id of user</param> /// <returns>true if user owns that game else false</returns> public static bool GameOwnedByUser(int gameId, int userId) { return(DbUserGames.GameOwnedByUser(gameId, userId)); }
/// <summary> /// returns a list of all user games that a certain user holds /// </summary> /// <param name="user">id of user</param> /// <returns>list of userGame</returns> public static List <UserGame> UserGames(int user) { return((from DataRow row in DbUserGames.GetUserGames(user).Rows select new UserGame(row)).ToList()); }
/// <summary> /// adds a game to a user /// </summary> /// <param name="user">id of user</param> /// <param name="game">id of game</param> /// <param name="price">price it cost</param> public static void AddGame(int user, int game, double price) { DbUserGames.AddGame(user, game, price); }