Why is the methode FindUserAsync of UserStore<> marked private and protected?
Because of public override Task<TUser> FindByIdAsync(string userId not respect the TKey of user this method is needed to access.
Implement a custom UserStore with 麓long麓 as TKey for user.
C#
public class UserStore : UserStore<User, Role, ModelContext, long, UserClaim, UserRole, UserLogin, UserToken, RoleClaim>
{
You shouldn't be this far down, there are public apis for finding things by keys. But string is always the key for public apis, your store needs to do the necessary conversion against your user class.
This is by design, because TKey is just yet another layer of generics which frankly didn't work for consumers.
For what property is FindByIdAsync looking at, the email address? Maybe the name is somehow misleading? So you mean searching for a user by ID is something to avoid in general?
The user ID and the email field can be different, but our templates by default make them the same. However that's up to you, and you can change it.
Sorry, I didn't get it, how to utilize FindByIdAsync when the user key's is long?
In my User class I've override key as Int now to find it by FindByIdAsync ? any one has idea?
@blowdart I've TUser with Tkey as Int in DB. I am trying to create a override version of FindByIdAsync.
Most helpful comment
Sorry, I didn't get it, how to utilize
FindByIdAsyncwhen the user key's islong?