V
Venky Gopireddy
Guest
var userManager = context.OwinContext.GetUserManager<ApplicationUserManager>();
var user = await userManager.FindByNameAsync(context.UserName);
I have got the value in context.UserName and the same username is existed in DB. But FindByNameAsync() function returning null sometimes for the first call.
if I call same function again it is giving output as expected. when I call it as in the below code.
if(user == null) {
var user = await userManager.FindByNameAsync(context.UserName);
}
Please help me.
Many thanks in advance for the help.
Note : it is not happening every time but happening quite often.
Continue reading...
var user = await userManager.FindByNameAsync(context.UserName);
I have got the value in context.UserName and the same username is existed in DB. But FindByNameAsync() function returning null sometimes for the first call.
if I call same function again it is giving output as expected. when I call it as in the below code.
if(user == null) {
var user = await userManager.FindByNameAsync(context.UserName);
}
Please help me.
Many thanks in advance for the help.
Note : it is not happening every time but happening quite often.
Continue reading...