Example #1
0
 // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
 public void Configure(IApplicationBuilder app, IHostingEnvironment env)
 {
     if (env.IsDevelopment())
     {
         app.UseDeveloperExceptionPage();
     }
     else
     {
         app.UseHsts();
     }
     using (var apiContext = new AcikSecimDBContext())
     {
         apiContext.Database.Migrate();
     }
     app.UseHttpsRedirection();
     app.UseAuthentication();
     app.UseMvc();
 }
Example #2
0
 public ValuesController(IConfiguration configuration)
 {
     _configuration = configuration;
     _apiDbContext  = new AcikSecimDBContext();
 }