GraduateDesignCourseDAL.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using EMIS.ViewModel.GraduationManage.GraduationRequirement;
  6. using System.Linq.Expressions;
  7. using EMIS.Entities;
  8. using EMIS.DataLogic.Repositories;
  9. namespace EMIS.DataLogic.GraduationManage.GraduationRequirement
  10. {
  11. public class GraduateDesignCourseDAL
  12. {
  13. public GraduateDesignCoursematerialRepository GraduateDesignCoursematerialRepository { get; set; }
  14. public CoursematerialRepository CoursematerialRepository { get; set; }
  15. /// <summary>
  16. /// 查询对应的毕业设计课程信息View
  17. /// </summary>
  18. /// <param name="expStudent"></param>
  19. /// <returns></returns>
  20. public IQueryable<GraduateDesignCourseView> GetGraduateDesignCourseViewQueryable(Expression<Func<ER_GraduateDesignCoursematerial, bool>> exp)
  21. {
  22. var query = from gdc in GraduateDesignCoursematerialRepository.GetList(exp)
  23. join cou in CoursematerialRepository.Entities
  24. on gdc.CoursematerialID equals cou.CoursematerialID
  25. select new GraduateDesignCourseView
  26. {
  27. GraduateDesignCoursematerialID = gdc.GraduateDesignCoursematerialID,
  28. CoursematerialID = gdc.CoursematerialID,
  29. CourseCode = cou.CourseCode,
  30. CourseName = cou.CourseName,
  31. CourseTypeID = gdc.CourseTypeID,
  32. CourseCredit = gdc.CourseCredit,
  33. ResultTypeID = gdc.ResultTypeID,
  34. RecordStatus = gdc.RecordStatus,
  35. CreateUserID = gdc.CreateUserID,
  36. CreateTime = gdc.CreateTime,
  37. ModifyUserID = gdc.ModifyUserID,
  38. ModifyTime = gdc.ModifyTime
  39. };
  40. return query;
  41. }
  42. }
  43. }