// This method gets called by the runtime. Use this method to configure the HTTP request pipeline. public void Configure(IApplicationBuilder app, IWebHostEnvironment env, PropertyTrackContext dbOpt) { if (env.IsDevelopment()) { app.UseDeveloperExceptionPage(); } else { app.UseExceptionHandler("/Home/Error"); } dbOpt.Database.EnsureCreated(); app.UseCors(MyAllowSpecificOrigins); app.UseHttpsRedirection(); app.UseRouting(); app.UseAuthorization(); app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); }
public CategoryService(PropertyTrackContext context) { _context = context; }
public ItemService(PropertyTrackContext context) { _context = context; }