public IActionResult Login(CustomerViewModel customer) { // verify login if (customerViewModel.Login(customer.Name) is null) { customer.Name = null; } ModelState.Remove("CustomerSelected"); if (ModelState.IsValid) { TempData["CustomerLoggedIn"] = customer.Name; TempData.Keep("CustomerLoggedIn"); return(Redirect("/Customer")); } return(View()); }