1234567891011121314151617181920212223242526272829303132333435 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using EMIS.DataLogic.Repositories;
- using EMIS.ViewModel.Students;
- using System.Linq.Expressions;
- using EMIS.Entities;
- namespace EMIS.DataLogic.Common.Students
- {
- public class StudentFamilyDAL
- {
- public StudentFamilyRepository StudentFamilyRepository { get; set; }
- public IQueryable<StudentFamilyView> GetStudentFamilyViewQueryable(Expression<Func<CF_StudentFamily, bool>> exp)
- {
- var query = (from family in StudentFamilyRepository.GetList(exp)
- orderby family.OrderNo
- select new StudentFamilyView
- {
- StudentFamilyID = family.StudentFamilyID,
- UserID = family.UserID,
- Name = family.Name,
- Relation = family.Relation,
- Age = family.Age,
- Politics = family.Politics,
- Unit = family.Unit,
- PhoneNumber = family.PhoneNumber
- });
- return query;
- }
- }
- }
|