public IList <JobIndexPointWithEmployee> Find <T>(Expression <Func <T, bool> > predicate, IListFetchStrategy <JobIndexPointWithEmployee> fetchStrategy) where T : EmployeePoint { var q = from j in session.Query <T>().Where(predicate) join e in session.Query <Employee>() on j.EmployeeId equals e.Id select new JobIndexPointWithEmployee { JobIndexPoint = j, Employee = e }; var res = FetchStrategyHelper.ExecuteQuery(q2 => q2.ToList(), q, fetchStrategy); fetchStrategy.PageCriteria.PageResult.Result = res; return(res); }
public IList <CalculationWithPolicyAndPeriod> FindByWithPolicy(Domain.Model.Periods.PeriodId periodId, IListFetchStrategy <CalculationWithPolicyAndPeriod> fs) { var q = from c in session.Query <Calculation>() where c.PeriodId == periodId join p in session.Query <Policy>() on c.PolicyId equals p.Id join pr in session.Query <Period>() on c.PeriodId equals pr.Id select new CalculationWithPolicyAndPeriod { Calculation = c, Policy = p, Period = pr }; var res = FetchStrategyHelper.ExecuteQuery(q2 => q2.ToList(), q, fs); fs.PageCriteria.PageResult.Result = res; return(res); }
public IList <CalculationPoint> Find(Expression <Func <CalculationPoint, bool> > predicate, IListFetchStrategy <CalculationPoint> fetchStrategy) { return(rep.Find(predicate, fetchStrategy)); }