public IActionResult AddAlien(string alienkey, string regdssn, string name, string danger, string race, string planet, string type) { model = new AlienModel(HttpContext.Session.GetString("dbusername"), HttpContext.Session.GetString("dbpassword")); if (type == "regd") { model.AddAlien(alienkey, regdssn, name, danger, race, planet, "true"); } else { model.AddAlien(alienkey, null, name, danger, race, null, "false"); } return(RedirectToAction("Index")); }