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