/// <summary> /// Insert test data if the session key is null for users, products, bids /// Hard code user Id for session /// Should be moved to application startup if possible /// </summary> private void InsertSeedData() { if (_context.HttpContext.Session.GetInt32("AuctionCurrentUserId") == null) { _context.HttpContext.Session.SetInt32("AuctionCurrentUserId", 2); } _productService.SetProducts(); _bidService.SetBids(); }