// GET: Classrooms public List <PartialClassroomVM> Get() { return(repository.Classrooms().Select(c => new PartialClassroomVM { ID = c.ID, Name = c.Name, Location = c.Location, Remarks = c.Remarks, AmountStudentsMax = c.AmountStudentsMax, IsEditable = c.Schedules.Count == 0 }).ToList()); }
// GET: Classrooms public ActionResult Index() { return(View(repository.Classrooms().ToList())); }