// get all game public IEnumerable <Game> GetAllGames() { using (var db = new ArcadeContext()) { return(db.ArcadeGames.OrderBy(o => o.Title).ToList()); } }
public void Count_Starts_At_Zero() { var db = new ArcadeContext(); var underTest = new ProductRepository(db); var count = underTest.Count(); Assert.Equal(underTest.Count(), count); }
//get one game public IHttpActionResult GetOneGame(int id) { using (var db = new ArcadeContext()) { var game = db.ArcadeGames.SingleOrDefault(s => s.Id == id); if (game == null) { return(NotFound()); } else { return(Ok(game)); } } }
public ReviewRepository(ArcadeContext db) { this.db = db; }
public ProductRepositoryTests() { db = new ArcadeContext(); db.Database.BeginTransaction(); underTest = new ProductRepository(db); }
public ProductRepository(ArcadeContext db) { this.db = db; }