コード例 #1
0
        // 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();
            });
        }
コード例 #2
0
 public CategoryService(PropertyTrackContext context)
 {
     _context = context;
 }
コード例 #3
0
ファイル: ItemService.cs プロジェクト: tab87vn/pt-be-netcore3
 public ItemService(PropertyTrackContext context)
 {
     _context = context;
 }