public BarIndexViewModel(WhatsOnTapContext context) { _db = context; AllBars = _db.Bars.ToList(); Matches = _db.Bars.ToList(); SetNeighborhoods(); }
public void Configure(IApplicationBuilder app, WhatsOnTapContext db) { db.Database.Migrate(); app.UseStaticFiles(); app.UseDeveloperExceptionPage(); app.UseIdentity(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); app.Run(async(context) => { await context.Response.WriteAsync("Invalid path or request. Please try again."); }); }
public BeersController(WhatsOnTapContext context) { _db = context; }
public BeerDetailsViewModel(WhatsOnTapContext context, int id) { _db = context; CurrentBeer = _db.Beers.FirstOrDefault(beers => beers.BeerId == id); }
public SettingController(WhatsOnTapContext context, IHubContext <MenuHub> menuHubContext) { _context = context; _menuHubContext = menuHubContext; }
public UserController(UserManager <ApplicationUser> userManager, WhatsOnTapContext db) { _userManager = userManager; _db = db; }
public BeerIndexViewModel(WhatsOnTapContext context) { _db = context; AllBeers = _db.Beers.ToList(); Matches = _db.Beers.ToList(); }
public AccountController(UserManager <ApplicationUser> userManager, SignInManager <ApplicationUser> signInManager, WhatsOnTapContext db) { _userManager = userManager; _signInManager = signInManager; _db = db; }