public AccountController(SignInManager <TCPUser> signInManager, EmailService emailService, BraintreeGateway braintreeGateway, TCPDbContext context) { this._signInManager = signInManager; this._emailService = emailService; this._braintreeGateway = braintreeGateway; this._context = context; }
internal static void Initialize(TCPDbContext db) { db.Database.Migrate(); if (db.Products.Count() == 0) { db.Products.Add(new Product { Description = "THE CHESED PROJECT T-SHIRT", Image = @"\images\tshirt.jpg ", Name = "THE CHESED PROJECT", Price = 29.99m }); db.Products.Add(new Product { Description = "TCP T-SHIRT", Image = @"\images\clothes.jpg", Name = "TCP", Price = 29.99m }); db.SaveChanges(); } }
public CheckOutController(TCPDbContext context, SignInManager <TCPUser> signInManager, Braintree.BraintreeGateway braintreeGateway, EmailService emailService, SmartyStreets.USStreetApi.Client usStreetApiClient) { this._context = context; this._signInManager = signInManager; this._brainTreeGateway = braintreeGateway; this._usStreetApiClient = usStreetApiClient; this._emailService = emailService; }
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, TCPDbContext 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?}"); }); DbInitializer.Initialize(db); }
public GemachController(TCPDbContext context, SignInManager <TCPUser> signInManager) { _context = context; _signInManager = signInManager; }
public CartController(TCPDbContext context) { _context = context; }
public ProductsAdminController(TCPDbContext context, IHostingEnvironment env) { _context = context; _env = env; }
public HomeController(TCPDbContext tcpDbContext) { _db = tcpDbContext; }