StudentExperienceDAL.cs 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using EMIS.DataLogic.Repositories;
  6. using EMIS.ViewModel.Students;
  7. using System.Linq.Expressions;
  8. using EMIS.Entities;
  9. namespace EMIS.DataLogic.Common.Students
  10. {
  11. public class StudentExperienceDAL
  12. {
  13. public StudentExperienceRepository StudentExperienceRepository { get; set; }
  14. public IQueryable<StudentExperienceView> GetStudentExperienceViewQueryable(Expression<Func<CF_StudentExperience, bool>> exp)
  15. {
  16. var query = (from experience in StudentExperienceRepository.GetList(exp)
  17. orderby experience.StartYear descending, experience.StartMonth descending
  18. select new StudentExperienceView
  19. {
  20. StudentExperienceID = experience.StudentExperienceID,
  21. UserID = experience.UserID,
  22. StartYear = experience.StartYear,
  23. StartMonth = experience.StartMonth,
  24. EndYear = experience.EndYear,
  25. EndMonth = experience.EndMonth,
  26. Experience = experience.Experience,
  27. }
  28. );
  29. return query;
  30. }
  31. }
  32. }