1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- 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; }
- /// <summary>
- /// 查询对应的毕业设计课程信息View
- /// </summary>
- /// <param name="expStudent"></param>
- /// <returns></returns>
- public IQueryable<GraduateDesignCourseView> GetGraduateDesignCourseViewQueryable(Expression<Func<ER_GraduateDesignCoursematerial, bool>> 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;
- }
- }
- }
|