[Identity] Make store Contexts virtual (#9517)

This commit is contained in:
Hao Kung 2019-04-29 22:24:51 -07:00 committed by GitHub
parent ae5b1135f5
commit 3020264ec7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -63,7 +63,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
{
public RoleStore(TContext context, Microsoft.AspNetCore.Identity.IdentityErrorDescriber describer = null) { }
public bool AutoSaveChanges { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public TContext Context { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
public virtual TContext Context { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
public Microsoft.AspNetCore.Identity.IdentityErrorDescriber ErrorDescriber { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public virtual System.Linq.IQueryable<TRole> Roles { get { throw null; } }
public virtual System.Threading.Tasks.Task AddClaimAsync(TRole role, System.Security.Claims.Claim claim, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
@ -106,7 +106,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
{
public UserOnlyStore(TContext context, Microsoft.AspNetCore.Identity.IdentityErrorDescriber describer = null) : base (default(Microsoft.AspNetCore.Identity.IdentityErrorDescriber)) { }
public bool AutoSaveChanges { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public TContext Context { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
public virtual TContext Context { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
protected Microsoft.EntityFrameworkCore.DbSet<TUserClaim> UserClaims { get { throw null; } }
protected Microsoft.EntityFrameworkCore.DbSet<TUserLogin> UserLogins { get { throw null; } }
public override System.Linq.IQueryable<TUser> Users { get { throw null; } }
@ -165,7 +165,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
{
public UserStore(TContext context, Microsoft.AspNetCore.Identity.IdentityErrorDescriber describer = null) : base (default(Microsoft.AspNetCore.Identity.IdentityErrorDescriber)) { }
public bool AutoSaveChanges { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } [System.Runtime.CompilerServices.CompilerGeneratedAttribute]set { } }
public TContext Context { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
public virtual TContext Context { [System.Runtime.CompilerServices.CompilerGeneratedAttribute]get { throw null; } }
public override System.Linq.IQueryable<TUser> Users { get { throw null; } }
public override System.Threading.Tasks.Task AddClaimsAsync(TUser user, System.Collections.Generic.IEnumerable<System.Security.Claims.Claim> claims, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public override System.Threading.Tasks.Task AddLoginAsync(TUser user, Microsoft.AspNetCore.Identity.UserLoginInfo login, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }

View File

@ -103,7 +103,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
/// <summary>
/// Gets the database context for this store.
/// </summary>
public TContext Context { get; private set; }
public virtual TContext Context { get; private set; }
/// <summary>
/// Gets or sets the <see cref="IdentityErrorDescriber"/> for any error that occurred with the current operation.

View File

@ -109,7 +109,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
/// <summary>
/// Gets the database context for this store.
/// </summary>
public TContext Context { get; private set; }
public virtual TContext Context { get; private set; }
/// <summary>
/// DbSet of users.

View File

@ -123,7 +123,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore
/// <summary>
/// Gets the database context for this store.
/// </summary>
public TContext Context { get; private set; }
public virtual TContext Context { get; private set; }
private DbSet<TUser> UsersSet { get { return Context.Set<TUser>(); } }
private DbSet<TRole> Roles { get { return Context.Set<TRole>(); } }