// GET: StudentController public ActionResult Index() { if (string.IsNullOrEmpty(HttpContext.Session.GetString("User"))) { TempData["Pesan"] = "<span class='alert alert-danger'>Anda belum login/span>"; return(RedirectToAction("Login", "User")); } else { TempData["Pesan"] = string.Empty; } if (TempData["Pesan"] != null) { ViewBag.Pesan = TempData["Pesan"]; } var model = _student.GetAll().ToList(); return(View(model)); }
public List <Student> GetAll() { return(dal.GetAll()); }
public IEnumerable <student> GetStudents() { return(studentDAL.GetAll()); }
public ICollection <Student> GetList() { return(_studentDAL.GetAll()); }