예제 #1
0
        public async Task <ActionResult <ResultData> > GetScs()
        {
            var scs = await _studentCourseRepository.GetAllEntitiesAsIQueryable()
                      .Include(x => x.Student)
                      .Include(x => x.Course).ToListAsync();

            var dtos = _mapper.Map <IEnumerable <StudentCourseDto> >(scs);

            return(new ResultData(ReturnCode.Succeed, scs.Count(), "选课信息", dtos));
        }