On first request method gets executed but on the second call it doesn't, I am aslo using await keyword?
The method which I am calling is not an async method?
When I debug the code user comes null once I logout and again login but by going inside the method with F11 user gets filled, can someone help me to understand this?
- public async Task
AuthenticateUser([FromBody] User user) - {
- Login login = new Login();
- user = await login.AuthenticateUser(user.LoginId, user.Password);
- if (userDetails!=null)
- {
- return Ok(userDetails);
- }
- return BadRequest();
- }

Tamal MarickRank #4,584 · 336 reputationPosted Aug 12, 2019, 2:36 AM EDT
Sivakumar KonetiRank #1,556 · 1K reputationPosted Aug 12, 2019, 1:52 AM EDT
Sonu GuptaRank #1,261 · 1.4K reputationPosted Aug 12, 2019, 3:24 AM EDT
Karan Thakkar186 reputationPosted Aug 12, 2019, 2:54 AM EDT