public async Task<IActionResult> About()
{
var data = from s in _studentRepository.GetAll()
group s by s.EnrollmentDate into dateGroup
select new EnrollmentDateGroupDto
{
EnrollmentDate = dateGroup.Key,
StudentCount = dateGroup.Count()
};
var dots = await data.AsTracking().ToListAsync();
return View(dots);
}
C#中Linq查询使用分组查询
C#中Linq查询使用分组查询
C#中Linq查询使用分组查询
C#中Linq查询使用分组查询
C#中Linq查询使用分组查询
C#中Linq查询使用分组查询
C#中Linq查询使用分组查询
C#中Linq查询使用分组查询
C#中Linq查询使用分组查询