123456789101112131415161718192021222324252627282930313233 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMIS.ViewModel.SupervisionManage;
- using System.Linq.Expressions;
- using EMIS.Entities;
- using EMIS.DataLogic.Repositories;
- namespace EMIS.DataLogic.SupervisionManage
- {
- public class SupervisionCollegeDAL
- {
- public SupervisionCollegeRepository SupervisionCollegeRepository { get; set; }
- public CollegeRepository CollegeRepository { get; set; }
- public IQueryable<SupervisionCollegeView> GetSupervisionCollegeViewQuery(Expression<Func<SUP_SupervisionCollege, bool>> exp)
- {
- var sql = (from supervisionCollege in SupervisionCollegeRepository.GetList(exp)
- from college in CollegeRepository.Entities.Where(x => x.CollegeID == supervisionCollege.CollegeID).DefaultIfEmpty()
- select new SupervisionCollegeView
- {
- SupervisionCollegeID = supervisionCollege.SupervisionCollegeID,
- Name = supervisionCollege.Name,
- CollegeID = college.CollegeID,
- CollegeNo = college.No,
- CollegeName = college.Name
- });
- return sql;
- }
- }
- }
|