public ActionResult Details(int id) { if (Session["log"] == null) { return(RedirectToAction("Login", "Home", null)); } ClassRoomViewModel ClassRoom = ClassRoomService.GetByID(id); return(View(ClassRoom)); }