You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class UserStore : UserStoreInt<DbContext>
{
public UserStore(DbContext context)
: base(context)
{
}
}
And I am accessing FindByIdAsync method in some repository as:
await _userStore.FindByIdAsync(userId) //datatype of userId is int
On checking the definition of FindByIdAsync here, I found that the parameter of the function has 'string' hardcoded.
I think it should have TKey instead of string because, UserStoreInt also implements this method. I realized that you have called "ConvertIdFromString" inside that method, but that rarely would work in real scenarios because the one using int as type will have to explicitly convert Ids to string and then in your method, it will reconvert to int.
I can make that small change and send a PR. Need your confirmation.
The text was updated successfully, but these errors were encountered:
Here is my UserStoreInt implementation,
And I am accessing FindByIdAsync method in some repository as:
await _userStore.FindByIdAsync(userId) //datatype of userId is int
On checking the definition of FindByIdAsync here, I found that the parameter of the function has 'string' hardcoded.
I think it should have TKey instead of string because, UserStoreInt also implements this method. I realized that you have called "ConvertIdFromString" inside that method, but that rarely would work in real scenarios because the one using int as type will have to explicitly convert Ids to string and then in your method, it will reconvert to int.
I can make that small change and send a PR. Need your confirmation.
The text was updated successfully, but these errors were encountered: