roy_sanu
asked on
C Sharp new learner on View model issue
public async Task<IActionResult> Login(LoginViewModel model, string returnUrl = null)
{
if (ModelState.IsValid)
{
// work with the model
}
// At this point, something failed, redisplay form
return View(model);
}
Expert please explain me why
One has to validate i.e below
if (ModelState.IsValid)
Can this view object can be used in services structure where business logic resides.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.