public ActionResult AdminLogin(Admin admin) { var results = db.AdminLogin(admin.UserName, admin.Password).SingleOrDefault(); if (results != null) { return(RedirectToAction("AdminPg", "AdminPage")); } else { return(RedirectToAction("Index", "Home")); } }