public ActionResult Stats() { IQueryable <EnrollmentDateGroup> data = from student in db.Students group student by student.EnrollmentDate into DateGroup select new EnrollmentDateGroup() { EnrollmentDate = DateGroup.Key, StudentCount = DateGroup.Count() }; return(View(data.ToList())); }
public ActionResult About() { var data = from student in db.Students group student by student.Birth into DateGroup select new BirthDateGroup() { Birth = DateGroup.Key, StudentCount = DateGroup.Count() }; return(View(data.ToList())); }