diff --git a/sandbox/OpenIddict.Sandbox.AspNet.Client/Startup.cs b/sandbox/OpenIddict.Sandbox.AspNet.Client/Startup.cs index 67fd740f..8cd8315c 100644 --- a/sandbox/OpenIddict.Sandbox.AspNet.Client/Startup.cs +++ b/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().AsSelf().InstancePerLifetimeScope(); + // Register the MVC controllers. builder.RegisterControllers(typeof(Startup).Assembly); diff --git a/sandbox/OpenIddict.Sandbox.AspNet.Server/Startup.cs b/sandbox/OpenIddict.Sandbox.AspNet.Server/Startup.cs index c1b2ea00..051a1d21 100644 --- a/sandbox/OpenIddict.Sandbox.AspNet.Server/Startup.cs +++ b/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().AsSelf().InstancePerLifetimeScope(); + // Register the MVC controllers. builder.RegisterControllers(typeof(Startup).Assembly);