using System; using System.Collections.Generic; using System.Linq; using System.Text; using EMIS.ViewModel.GraduationManage.GraduationRequirement; using System.Linq.Expressions; using EMIS.Entities; using EMIS.DataLogic.Repositories; namespace EMIS.DataLogic.GraduationManage.GraduationRequirement { public class GraduateDesignCourseDAL { public GraduateDesignCoursematerialRepository GraduateDesignCoursematerialRepository { get; set; } public CoursematerialRepository CoursematerialRepository { get; set; } /// /// 查询对应的毕业设计课程信息View /// /// /// public IQueryable GetGraduateDesignCourseViewQueryable(Expression> exp) { var query = from gdc in GraduateDesignCoursematerialRepository.GetList(exp) join cou in CoursematerialRepository.Entities on gdc.CoursematerialID equals cou.CoursematerialID select new GraduateDesignCourseView { GraduateDesignCoursematerialID = gdc.GraduateDesignCoursematerialID, CoursematerialID = gdc.CoursematerialID, CourseCode = cou.CourseCode, CourseName = cou.CourseName, CourseTypeID = gdc.CourseTypeID, CourseCredit = gdc.CourseCredit, ResultTypeID = gdc.ResultTypeID, RecordStatus = gdc.RecordStatus, CreateUserID = gdc.CreateUserID, CreateTime = gdc.CreateTime, ModifyUserID = gdc.ModifyUserID, ModifyTime = gdc.ModifyTime }; return query; } } }