public ActionResult Add() { if (Session["log"] == null) { return(RedirectToAction("Login", "Home", null)); } ViewBag.Classes = ClassRoomService.GetAll(); return(View()); }
// GET: Home public ActionResult ClassRoom() { if (Session["log"] == null) { return(RedirectToAction("Login", "Home", null)); } var ClassRooms = ClassRoomService.GetAll().ToList(); return(View(ClassRooms)); }
public IEnumerable <ClassRoomViewModel> Get() { return(ClassRoomService.GetAll()); }