public IActionResult CreateNew(LogInViewModel model) { model.IsUser = (bool)TempData["IsUser"]; if (model.IsUser) { int newUserID = _repo.AddUser(model.NewName); if (newUserID == -1) { TempData.Keep("IsUser"); model.ReasonForError = "There was an error processing your request. Please try again."; return(View("DoesNotExist", model)); } UserViewModel userViewModel = new UserViewModel(); userViewModel.Name = model.NewName; userViewModel.ID = newUserID; return(View("NewAdded", userViewModel)); } else { TempData.Keep("IsUser"); Console.WriteLine("Someone is attempting to create a store"); model.ReasonForError = "There was an error processing your request. Please try again later."; return(View("DoesNotExist", model)); } }