Skip to content

Commit

Permalink
Remove ApplicationDeploy Extension Middleware and Inject this Context…
Browse files Browse the repository at this point in the history
… in Configure Method and Migrate it.
  • Loading branch information
Sullivan008 authored and Péter Kozák committed Jun 24, 2020
1 parent 79b5fbb commit a1c1f1c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 48 deletions.
31 changes: 0 additions & 31 deletions SimpleCRUDExample/Core/Middlewares/ApplicationDeploy.cs

This file was deleted.

12 changes: 0 additions & 12 deletions SimpleCRUDExample/Core/Middlewares/ApplicationDeployExtension.cs

This file was deleted.

8 changes: 3 additions & 5 deletions SimpleCRUDExample/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using SimpleCRUDExample.Core.Configurations;
using SimpleCRUDExample.Core.Middlewares;
using SimpleCRUDExample.Core.Models.ConfigModels;

namespace SimpleCRUDExample
Expand Down Expand Up @@ -38,7 +37,7 @@ public void ConfigureServices(IServiceCollection services)
services.ConfigureAuthService();
services.ConfigureCookieService();
services.Configure<LoginConfigModel>(_configuration.GetSection("DevLoginConfig"));

services.ConfigureBusinessEngines();
services.ConfigureCoreModules();

Expand All @@ -47,7 +46,7 @@ public void ConfigureServices(IServiceCollection services)
services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_2);
}

public void Configure(IApplicationBuilder app, IHostingEnvironment env)
public void Configure(IApplicationBuilder app, IHostingEnvironment env, CRUDAppContext context)
{
if (env.IsDevelopment())
{
Expand All @@ -62,9 +61,8 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env)
app.UseCookiePolicy();

app.UseAuthentication();


app.UseApplicationDeploy();
context.Database.Migrate();

app.UseMvc(routes =>
{
Expand Down

0 comments on commit a1c1f1c

Please sign in to comment.