// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IHostingEnvironment env, Dev_CampregistrationContext dbContext) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } dbContext.Database.EnsureCreated(); app.UseMvc(); }
public UnitOfWork(Dev_CampregistrationContext devCampregistrationContext) { this.devCampregistrationContext = devCampregistrationContext; this.IProductRepository = new ProductRepository(this.devCampregistrationContext); }
public ProductController() { this._devCampregistrationContext = new Dev_CampregistrationContext(); this.UnitOfWork = new UnitOfWork(this._devCampregistrationContext); }