public ReceiptController(ThisSiteDbContext thisSiteDbContext, EmailService emailService, SignInManager <ThisSiteUser> signInManager, BraintreeGateway braintreeGateway) { this._thisSiteDbContext = thisSiteDbContext; this._emailService = emailService; this._signInManager = signInManager; this._brainTreeGateway = braintreeGateway; }
public CheckoutController(ThisSiteDbContext thisSiteDbContext, EmailService emailService, SignInManager <ThisSiteUser> signInManager, BraintreeGateway braintreeGateway, SmartyStreets.USStreetApi.Client usStreetApiClient) { this._thisSiteDbContext = thisSiteDbContext; this._emailService = emailService; this._signInManager = signInManager; this._brainTreeGateway = braintreeGateway; this._usStreetApiClient = usStreetApiClient; }
//using Microsoft.AspNetCore.Identity public AccountController( SignInManager <ThisSiteUser> signInManager, EmailService emailService, BraintreeGateway braintreeGateway, ThisSiteDbContext thisSiteDbContext, RoleManager <IdentityRole> roleManager ) { this._signInManager = signInManager; this._emailService = emailService; _braintreeGateway = braintreeGateway; this._thisSiteDbContext = thisSiteDbContext; }
internal static void Initialize(this ThisSiteDbContext db) { db.Database.Migrate(); if (db.Products.Count() == 0) { db.Products.Add(new Product { Description = "This hat sucks.", Image = "/images/hat1.jpg", Name = "This Site Sucks, the Hat", Price = 25m }); db.Products.Add(new Product { Description = "This shirt sucks.", Image = "/images/shirt1.jpg", Name = "This Site Sucks, the Shirt", Price = 20m }); db.Products.Add(new Product { Description = "<div style=\"align:center\">", Image = "/images/shirtcss1.jpg", Name = "CSS Sucks, The Shirt", Price = 20m }); db.Products.Add(new Product { Description = "Like your dreams, this shirt is broken.", Image = "/images/brokenshirt.jpg", Name = "Broken Shirt, The Shirt", Price = 20m }); db.SaveChanges(); } }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, ThisSiteDbContext db) { if (env.IsDevelopment()) { app.UseBrowserLink(); app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Home/Error"); } app.UseAuthentication(); app.UseStaticFiles(); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller=Home}/{action=Index}/{id?}"); }); db.Initialize(); }
public HomeController(ThisSiteDbContext thisSiteDbContext) { _db = thisSiteDbContext; }
public CartController(ThisSiteDbContext context) { _context = context; }
public ProductsAdminController(ThisSiteDbContext context, IHostingEnvironment env) { _context = context; _env = env; }
public ProductController(ThisSiteDbContext context) { _context = context; }