diff --git a/src/OpenIddict.EF/OpenIddictContext.cs b/src/OpenIddict.EF/OpenIddictContext.cs index 45012696..f7a1b837 100644 --- a/src/OpenIddict.EF/OpenIddictContext.cs +++ b/src/OpenIddict.EF/OpenIddictContext.cs @@ -7,6 +7,7 @@ using System; using Microsoft.AspNetCore.Identity.EntityFrameworkCore; using Microsoft.EntityFrameworkCore; +using Microsoft.EntityFrameworkCore.Infrastructure; using OpenIddict.Models; namespace OpenIddict { @@ -15,10 +16,43 @@ namespace OpenIddict { where TApplication : Application where TRole : IdentityRole where TKey : IEquatable { + public OpenIddictContext() { } + + public OpenIddictContext(DbContextOptions options) + : base(options) { } + + public OpenIddictContext(IServiceProvider services) + : base(services) { } + + public OpenIddictContext(IServiceProvider services, DbContextOptions options) + : base(services, options) { } + public DbSet Applications { get; set; } } - public class OpenIddictContext : OpenIddictContext where TUser : IdentityUser { } + public class OpenIddictContext : OpenIddictContext where TUser : IdentityUser { + public OpenIddictContext() { } + + public OpenIddictContext(DbContextOptions options) + : base(options) { } + + public OpenIddictContext(IServiceProvider services) + : base(services) { } + + public OpenIddictContext(IServiceProvider services, DbContextOptions options) + : base(services, options) { } + } + + public class OpenIddictContext : OpenIddictContext { + public OpenIddictContext() { } - public class OpenIddictContext : OpenIddictContext { } + public OpenIddictContext(DbContextOptions options) + : base(options) { } + + public OpenIddictContext(IServiceProvider services) + : base(services) { } + + public OpenIddictContext(IServiceProvider services, DbContextOptions options) + : base(services, options) { } + } } \ No newline at end of file