Browse Source

Update the ASP.NET 4.8 samples to register the ApplicationDbContext type

pull/2283/head
Kévin Chalet 11 months ago
parent
commit
ed4c5819db
  1. 3
      sandbox/OpenIddict.Sandbox.AspNet.Client/Startup.cs
  2. 3
      sandbox/OpenIddict.Sandbox.AspNet.Server/Startup.cs

3
sandbox/OpenIddict.Sandbox.AspNet.Client/Startup.cs

@ -104,6 +104,9 @@ public class Startup
var builder = new ContainerBuilder();
builder.Populate(services);
// Register the Entity Framework context.
builder.RegisterType<ApplicationDbContext>().AsSelf().InstancePerLifetimeScope();
// Register the MVC controllers.
builder.RegisterControllers(typeof(Startup).Assembly);

3
sandbox/OpenIddict.Sandbox.AspNet.Server/Startup.cs

@ -125,6 +125,9 @@ public class Startup
var builder = new ContainerBuilder();
builder.Populate(services);
// Register the Entity Framework context.
builder.RegisterType<ApplicationDbContext>().AsSelf().InstancePerLifetimeScope();
// Register the MVC controllers.
builder.RegisterControllers(typeof(Startup).Assembly);

Loading…
Cancel
Save