Make dbsets virtual (#10638)
This commit is contained in:
parent
1a766d1ab4
commit
6e35229b01
|
|
@ -22,9 +22,9 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
|
|||
{
|
||||
protected IdentityDbContext() { }
|
||||
public IdentityDbContext(Microsoft.EntityFrameworkCore.DbContextOptions options) { }
|
||||
public Microsoft.EntityFrameworkCore.DbSet<TRoleClaim> RoleClaims { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public Microsoft.EntityFrameworkCore.DbSet<TRole> Roles { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public Microsoft.EntityFrameworkCore.DbSet<TUserRole> UserRoles { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public virtual Microsoft.EntityFrameworkCore.DbSet<TRoleClaim> RoleClaims { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public virtual Microsoft.EntityFrameworkCore.DbSet<TRole> Roles { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public virtual Microsoft.EntityFrameworkCore.DbSet<TUserRole> UserRoles { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
protected override void OnModelCreating(Microsoft.EntityFrameworkCore.ModelBuilder builder) { }
|
||||
}
|
||||
public partial class IdentityUserContext<TUser> : Microsoft.AspNetCore.Identity.EntityFrameworkCore.IdentityUserContext<TUser, string> where TUser : Microsoft.AspNetCore.Identity.IdentityUser
|
||||
|
|
@ -41,10 +41,10 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
|
|||
{
|
||||
protected IdentityUserContext() { }
|
||||
public IdentityUserContext(Microsoft.EntityFrameworkCore.DbContextOptions options) { }
|
||||
public Microsoft.EntityFrameworkCore.DbSet<TUserClaim> UserClaims { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public Microsoft.EntityFrameworkCore.DbSet<TUserLogin> UserLogins { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public Microsoft.EntityFrameworkCore.DbSet<TUser> Users { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public Microsoft.EntityFrameworkCore.DbSet<TUserToken> UserTokens { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public virtual Microsoft.EntityFrameworkCore.DbSet<TUserClaim> UserClaims { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public virtual Microsoft.EntityFrameworkCore.DbSet<TUserLogin> UserLogins { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public virtual Microsoft.EntityFrameworkCore.DbSet<TUser> Users { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
public virtual Microsoft.EntityFrameworkCore.DbSet<TUserToken> UserTokens { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
|
||||
protected override void OnModelCreating(Microsoft.EntityFrameworkCore.ModelBuilder builder) { }
|
||||
}
|
||||
public partial class RoleStore<TRole> : Microsoft.AspNetCore.Identity.EntityFrameworkCore.RoleStore<TRole, Microsoft.EntityFrameworkCore.DbContext, string> where TRole : Microsoft.AspNetCore.Identity.IdentityRole<string>
|
||||
|
|
|
|||
|
|
@ -99,17 +99,17 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
|
|||
/// <summary>
|
||||
/// Gets or sets the <see cref="DbSet{TEntity}"/> of User roles.
|
||||
/// </summary>
|
||||
public DbSet<TUserRole> UserRoles { get; set; }
|
||||
public virtual DbSet<TUserRole> UserRoles { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the <see cref="DbSet{TEntity}"/> of roles.
|
||||
/// </summary>
|
||||
public DbSet<TRole> Roles { get; set; }
|
||||
public virtual DbSet<TRole> Roles { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the <see cref="DbSet{TEntity}"/> of role claims.
|
||||
/// </summary>
|
||||
public DbSet<TRoleClaim> RoleClaims { get; set; }
|
||||
public virtual DbSet<TRoleClaim> RoleClaims { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Configures the schema needed for the identity framework.
|
||||
|
|
@ -152,4 +152,4 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
|
|||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,22 +79,22 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
|
|||
/// <summary>
|
||||
/// Gets or sets the <see cref="DbSet{TEntity}"/> of Users.
|
||||
/// </summary>
|
||||
public DbSet<TUser> Users { get; set; }
|
||||
public virtual DbSet<TUser> Users { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the <see cref="DbSet{TEntity}"/> of User claims.
|
||||
/// </summary>
|
||||
public DbSet<TUserClaim> UserClaims { get; set; }
|
||||
public virtual DbSet<TUserClaim> UserClaims { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the <see cref="DbSet{TEntity}"/> of User logins.
|
||||
/// </summary>
|
||||
public DbSet<TUserLogin> UserLogins { get; set; }
|
||||
public virtual DbSet<TUserLogin> UserLogins { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the <see cref="DbSet{TEntity}"/> of User tokens.
|
||||
/// </summary>
|
||||
public DbSet<TUserToken> UserTokens { get; set; }
|
||||
public virtual DbSet<TUserToken> UserTokens { get; set; }
|
||||
|
||||
private StoreOptions GetStoreOptions() => this.GetService<IDbContextOptions>()
|
||||
.Extensions.OfType<CoreOptionsExtension>()
|
||||
|
|
@ -201,4 +201,4 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
|
|||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue