public ActionResult Edit(int id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } var buss = new StudentBusiness(); var student = new StudentViewModel(); student = buss.FindIdStd(id); if (student == null) { return(HttpNotFound()); } return(View(student)); }