ExaminationTypeDAL.cs 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using EMIS.ViewModel.ExaminationApply;
  6. using EMIS.DataLogic.Repositories;
  7. using System.Linq.Expressions;
  8. using EMIS.Entities;
  9. namespace EMIS.DataLogic.ExaminationApply
  10. {
  11. public class ExaminationTypeDAL
  12. {
  13. public ExaminationTypeRepository ExaminationTypeRepository { get; set; }
  14. public IQueryable<ExaminationTypeView> GetExaminationTypeView(Expression<Func<EX_ExaminationType, bool>> examinationTypeExpression)
  15. {
  16. var q = (from et in ExaminationTypeRepository.GetList(examinationTypeExpression)
  17. orderby et.Name
  18. select new ExaminationTypeView
  19. {
  20. ExaminationTypeID = et.ExaminationTypeID,
  21. Name = et.Name,
  22. IsTimesLimit = et.IsTimesLimit ?? false,
  23. RecordStatus = et.RecordStatus,
  24. CreateUserID = et.CreateUserID,
  25. CreateTime = et.CreateTime,
  26. ModifyUserID = et.ModifyUserID,
  27. ModifyTime = et.ModifyTime
  28. });
  29. return q;
  30. }
  31. }
  32. }