@@ -18,7 +18,7 @@ namespace Microsoft.AspNetCore.Identity.EntityFrameworkCore;
18
18
/// </summary>
19
19
/// <param name="context">The <see cref="DbContext"/>.</param>
20
20
/// <param name="describer">The <see cref="IdentityErrorDescriber"/>.</param>
21
- public UserOnlyStore ( DbContext context , IdentityErrorDescriber describer = null ) : base ( context , describer ) { }
21
+ public UserOnlyStore ( DbContext context , IdentityErrorDescriber ? describer = null ) : base ( context , describer ) { }
22
22
}
23
23
24
24
/// <summary>
@@ -35,7 +35,7 @@ public class UserOnlyStore<TUser, TContext> : UserOnlyStore<TUser, TContext, str
35
35
/// </summary>
36
36
/// <param name="context">The <see cref="DbContext"/>.</param>
37
37
/// <param name="describer">The <see cref="IdentityErrorDescriber"/>.</param>
38
- public UserOnlyStore ( TContext context , IdentityErrorDescriber describer = null ) : base ( context , describer ) { }
38
+ public UserOnlyStore ( TContext context , IdentityErrorDescriber ? describer = null ) : base ( context , describer ) { }
39
39
}
40
40
41
41
/// <summary>
@@ -54,7 +54,7 @@ public class UserOnlyStore<TUser, TContext, TKey> : UserOnlyStore<TUser, TContex
54
54
/// </summary>
55
55
/// <param name="context">The <see cref="DbContext"/>.</param>
56
56
/// <param name="describer">The <see cref="IdentityErrorDescriber"/>.</param>
57
- public UserOnlyStore ( TContext context , IdentityErrorDescriber describer = null ) : base ( context , describer ) { }
57
+ public UserOnlyStore ( TContext context , IdentityErrorDescriber ? describer = null ) : base ( context , describer ) { }
58
58
}
59
59
60
60
/// <summary>
@@ -93,7 +93,7 @@ public class UserOnlyStore<TUser, TContext, TKey, TUserClaim, TUserLogin, TUserT
93
93
/// </summary>
94
94
/// <param name="context">The context used to access the store.</param>
95
95
/// <param name="describer">The <see cref="IdentityErrorDescriber"/> used to describe store errors.</param>
96
- public UserOnlyStore ( TContext context , IdentityErrorDescriber describer = null ) : base ( describer ?? new IdentityErrorDescriber ( ) )
96
+ public UserOnlyStore ( TContext context , IdentityErrorDescriber ? describer = null ) : base ( describer ?? new IdentityErrorDescriber ( ) )
97
97
{
98
98
if ( context == null )
99
99
{
@@ -226,12 +226,12 @@ protected Task SaveChanges(CancellationToken cancellationToken)
226
226
/// <returns>
227
227
/// The <see cref="Task"/> that represents the asynchronous operation, containing the user matching the specified <paramref name="userId"/> if it exists.
228
228
/// </returns>
229
- public override Task < TUser > FindByIdAsync ( string userId , CancellationToken cancellationToken = default ( CancellationToken ) )
229
+ public override Task < TUser ? > FindByIdAsync ( string userId , CancellationToken cancellationToken = default ( CancellationToken ) )
230
230
{
231
231
cancellationToken . ThrowIfCancellationRequested ( ) ;
232
232
ThrowIfDisposed ( ) ;
233
233
var id = ConvertIdFromString ( userId ) ;
234
- return UsersSet . FindAsync ( new object [ ] { id } , cancellationToken ) . AsTask ( ) ;
234
+ return UsersSet . FindAsync ( new object ? [ ] { id } , cancellationToken ) . AsTask ( ) ;
235
235
}
236
236
237
237
/// <summary>
@@ -242,7 +242,7 @@ protected Task SaveChanges(CancellationToken cancellationToken)
242
242
/// <returns>
243
243
/// The <see cref="Task"/> that represents the asynchronous operation, containing the user matching the specified <paramref name="normalizedUserName"/> if it exists.
244
244
/// </returns>
245
- public override Task < TUser > FindByNameAsync ( string normalizedUserName , CancellationToken cancellationToken = default ( CancellationToken ) )
245
+ public override Task < TUser ? > FindByNameAsync ( string normalizedUserName , CancellationToken cancellationToken = default ( CancellationToken ) )
246
246
{
247
247
cancellationToken . ThrowIfCancellationRequested ( ) ;
248
248
ThrowIfDisposed ( ) ;
@@ -264,7 +264,7 @@ public override IQueryable<TUser> Users
264
264
/// <param name="userId">The user's id.</param>
265
265
/// <param name="cancellationToken">The <see cref="CancellationToken"/> used to propagate notifications that the operation should be canceled.</param>
266
266
/// <returns>The user if it exists.</returns>
267
- protected override Task < TUser > FindUserAsync ( TKey userId , CancellationToken cancellationToken )
267
+ protected override Task < TUser ? > FindUserAsync ( TKey userId , CancellationToken cancellationToken )
268
268
{
269
269
return Users . SingleOrDefaultAsync ( u => u . Id . Equals ( userId ) , cancellationToken ) ;
270
270
}
@@ -277,7 +277,7 @@ protected override Task<TUser> FindUserAsync(TKey userId, CancellationToken canc
277
277
/// <param name="providerKey">The key provided by the <paramref name="loginProvider"/> to identify a user.</param>
278
278
/// <param name="cancellationToken">The <see cref="CancellationToken"/> used to propagate notifications that the operation should be canceled.</param>
279
279
/// <returns>The user login if it exists.</returns>
280
- protected override Task < TUserLogin > FindUserLoginAsync ( TKey userId , string loginProvider , string providerKey , CancellationToken cancellationToken )
280
+ protected override Task < TUserLogin ? > FindUserLoginAsync ( TKey userId , string loginProvider , string providerKey , CancellationToken cancellationToken )
281
281
{
282
282
return UserLogins . SingleOrDefaultAsync ( userLogin => userLogin . UserId . Equals ( userId ) && userLogin . LoginProvider == loginProvider && userLogin . ProviderKey == providerKey , cancellationToken ) ;
283
283
}
@@ -289,7 +289,7 @@ protected override Task<TUserLogin> FindUserLoginAsync(TKey userId, string login
289
289
/// <param name="providerKey">The key provided by the <paramref name="loginProvider"/> to identify a user.</param>
290
290
/// <param name="cancellationToken">The <see cref="CancellationToken"/> used to propagate notifications that the operation should be canceled.</param>
291
291
/// <returns>The user login if it exists.</returns>
292
- protected override Task < TUserLogin > FindUserLoginAsync ( string loginProvider , string providerKey , CancellationToken cancellationToken )
292
+ protected override Task < TUserLogin ? > FindUserLoginAsync ( string loginProvider , string providerKey , CancellationToken cancellationToken )
293
293
{
294
294
return UserLogins . SingleOrDefaultAsync ( userLogin => userLogin . LoginProvider == loginProvider && userLogin . ProviderKey == providerKey , cancellationToken ) ;
295
295
}
@@ -474,7 +474,7 @@ public override async Task RemoveLoginAsync(TUser user, string loginProvider, st
474
474
/// <returns>
475
475
/// The <see cref="Task"/> for the asynchronous operation, containing the user, if any which matched the specified login provider and key.
476
476
/// </returns>
477
- public override async Task < TUser > FindByLoginAsync ( string loginProvider , string providerKey ,
477
+ public override async Task < TUser ? > FindByLoginAsync ( string loginProvider , string providerKey ,
478
478
CancellationToken cancellationToken = default ( CancellationToken ) )
479
479
{
480
480
cancellationToken . ThrowIfCancellationRequested ( ) ;
@@ -495,7 +495,7 @@ public override async Task<TUser> FindByLoginAsync(string loginProvider, string
495
495
/// <returns>
496
496
/// The task object containing the results of the asynchronous lookup operation, the user if any associated with the specified normalized email address.
497
497
/// </returns>
498
- public override Task < TUser > FindByEmailAsync ( string normalizedEmail , CancellationToken cancellationToken = default ( CancellationToken ) )
498
+ public override Task < TUser ? > FindByEmailAsync ( string normalizedEmail , CancellationToken cancellationToken = default ( CancellationToken ) )
499
499
{
500
500
cancellationToken . ThrowIfCancellationRequested ( ) ;
501
501
ThrowIfDisposed ( ) ;
@@ -537,7 +537,7 @@ join user in Users on userclaims.UserId equals user.Id
537
537
/// <param name="name">The name of the token.</param>
538
538
/// <param name="cancellationToken">The <see cref="CancellationToken"/> used to propagate notifications that the operation should be canceled.</param>
539
539
/// <returns>The user token if it exists.</returns>
540
- protected override Task < TUserToken > FindTokenAsync ( TUser user , string loginProvider , string name , CancellationToken cancellationToken )
540
+ protected override Task < TUserToken ? > FindTokenAsync ( TUser user , string loginProvider , string name , CancellationToken cancellationToken )
541
541
=> UserTokens . FindAsync ( new object [ ] { user . Id , loginProvider , name } , cancellationToken ) . AsTask ( ) ;
542
542
543
543
/// <summary>
0 commit comments