public static IEnumerable <Game> GetGames() { var gameDB = new myGamesDBEntities(); var query = from games in gameDB.Games select games; return(query.ToList()); }
public static void InsertGame(Game game) { var gameDB = new myGamesDBEntities(); if (game.Name != null) { gameDB.Games.Add(game); gameDB.SaveChanges(); } }