public ActionResult Index2() { Student aStudent = new Student(); aStudent.Name="Darens"; return View(aStudent); }
private bool HasStudent(Student aStudent) { foreach (Student student in db.Students.ToList()) { if (student.RegNo==aStudent.RegNo) { return true; } } return false; }