|
|
@ -5,6 +5,7 @@ using System.Linq.Dynamic.Core; |
|
|
using System.Security.Claims; |
|
|
using System.Security.Claims; |
|
|
using System.Threading; |
|
|
using System.Threading; |
|
|
using System.Threading.Tasks; |
|
|
using System.Threading.Tasks; |
|
|
|
|
|
using JetBrains.Annotations; |
|
|
using Microsoft.EntityFrameworkCore; |
|
|
using Microsoft.EntityFrameworkCore; |
|
|
using Volo.Abp.Domain.Repositories.EntityFrameworkCore; |
|
|
using Volo.Abp.Domain.Repositories.EntityFrameworkCore; |
|
|
using Volo.Abp.EntityFrameworkCore; |
|
|
using Volo.Abp.EntityFrameworkCore; |
|
|
@ -301,4 +302,18 @@ public class EfCoreIdentityUserRepository : EfCoreRepository<IIdentityDbContext, |
|
|
{ |
|
|
{ |
|
|
return (await GetQueryableAsync()).IncludeDetails(); |
|
|
return (await GetQueryableAsync()).IncludeDetails(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public virtual async Task<IdentityUser> FindByTenantIdAndUserNameAsync( |
|
|
|
|
|
[NotNull] string userName, |
|
|
|
|
|
Guid? tenantId, |
|
|
|
|
|
bool includeDetails = true, |
|
|
|
|
|
CancellationToken cancellationToken = default) |
|
|
|
|
|
{ |
|
|
|
|
|
return await(await GetDbSetAsync()) |
|
|
|
|
|
.IncludeDetails(includeDetails) |
|
|
|
|
|
.FirstOrDefaultAsync( |
|
|
|
|
|
u => u.TenantId == tenantId && u.UserName == userName, |
|
|
|
|
|
GetCancellationToken(cancellationToken) |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|