Example #1
0
 public BarIndexViewModel(WhatsOnTapContext context)
 {
     _db     = context;
     AllBars = _db.Bars.ToList();
     Matches = _db.Bars.ToList();
     SetNeighborhoods();
 }
Example #2
0
 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.");
     });
 }
Example #3
0
 public BeersController(WhatsOnTapContext context)
 {
     _db = context;
 }
Example #4
0
 public BeerDetailsViewModel(WhatsOnTapContext context, int id)
 {
     _db         = context;
     CurrentBeer = _db.Beers.FirstOrDefault(beers => beers.BeerId == id);
 }
Example #5
0
 public SettingController(WhatsOnTapContext context, IHubContext <MenuHub> menuHubContext)
 {
     _context        = context;
     _menuHubContext = menuHubContext;
 }
Example #6
0
 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;
 }