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<IActionResult> AuthenticateUser([FromBody] User user)
- {
- Login login = new Login();
- user = await login.AuthenticateUser(user.LoginId, user.Password);
- if (userDetails!=null)
- {
- return Ok(userDetails);
- }
- return BadRequest();
- }