diff --git a/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/IdentityDbContext.cs b/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/IdentityDbContext.cs index 74d4f125fb..d6062d24a9 100644 --- a/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/IdentityDbContext.cs +++ b/src/Microsoft.AspNetCore.Identity.EntityFrameworkCore/IdentityDbContext.cs @@ -4,21 +4,77 @@ using System; using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore.Infrastructure; -using Microsoft.EntityFrameworkCore.Metadata; namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore { /// /// Base class for the Entity Framework database context used for identity. /// - public class IdentityDbContext : IdentityDbContext { } + public class IdentityDbContext : IdentityDbContext + { + /// + /// Initializes a new instance of . + /// + /// The options to be used by a . + public IdentityDbContext(DbContextOptions options) : base(options) + { } + + /// + /// Initializes a new instance of the class using an . + /// + /// The service provider to be used. + public IdentityDbContext(IServiceProvider serviceProvider) : base(serviceProvider) + { } + + /// + /// Initializes a new instance of the class using an . + /// + /// The options to be used by a . + /// The service provider to be used. + public IdentityDbContext(IServiceProvider serviceProvider, DbContextOptions options) : base(serviceProvider, options) + { } + + /// + /// Initializes a new instance of the class. + /// + public IdentityDbContext() + { } + } /// /// Base class for the Entity Framework database context used for identity. /// /// The type of the user objects. public class IdentityDbContext : IdentityDbContext where TUser : IdentityUser - { } + { + /// + /// Initializes a new instance of . + /// + /// The options to be used by a . + public IdentityDbContext(DbContextOptions options) : base(options) + { } + + /// + /// Initializes a new instance of the class using an . + /// + /// The service provider to be used. + public IdentityDbContext(IServiceProvider serviceProvider) : base(serviceProvider) + { } + + /// + /// Initializes a new instance of the class using an . + /// + /// The options to be used by a . + /// The service provider to be used. + public IdentityDbContext(IServiceProvider serviceProvider, DbContextOptions options) : base(serviceProvider, options) + { } + + /// + /// Initializes a new instance of the class. + /// + public IdentityDbContext() + { } + } /// /// Base class for the Entity Framework database context used for identity. @@ -36,18 +92,14 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore /// /// The options to be used by a . public IdentityDbContext(DbContextOptions options) : base(options) - { - - } + { } /// /// Initializes a new instance of the class using an . /// /// The service provider to be used. public IdentityDbContext(IServiceProvider serviceProvider) : base(serviceProvider) - { - - } + { } /// /// Initializes a new instance of the class using an . @@ -55,17 +107,13 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore /// The options to be used by a . /// The service provider to be used. public IdentityDbContext(IServiceProvider serviceProvider, DbContextOptions options) : base(serviceProvider, options) - { - - } + { } /// /// Initializes a new instance of the class. /// - protected IdentityDbContext() - { - - } + public IdentityDbContext() + { } /// /// Gets or sets the of Users.