using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Linq.Expressions; using EMIS.DataLogic.Repositories; using EMIS.ViewModel.PaymentManage; using EMIS.Entities; namespace EMIS.DataLogic.PaymentManage { public class LevelStandardDAL { public LevelStandardRepository LevelStandardRepository { get; set; } public TeacherTypeSettingRepository TeacherTypeSettingRepository { get; set; } public IQueryable GetLevelStandardViewQueryable(Expression> exp) { var query = from standard in LevelStandardRepository.GetList(exp) join setting in TeacherTypeSettingRepository.Entities on standard.TeacherType equals setting.TeacherTypeID into dsetting from setting in dsetting.DefaultIfEmpty() select new LevelStandardView { EmploymentTypeID = setting.EmploymentTypeID, LevelStandardID = standard.LevelStandardID, PaymentLevelID = standard.PaymentLevelID, TeacherType = standard.TeacherType, Amount = standard.Amount }; return query; } } }