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 GetStudentFamilyViewQueryable(Expression> 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; } } }