private Expression <Func <Models.Examination, bool> > GetOpenCasesPredicate(OpenClosedCases paramFilterOpenCases) { switch (paramFilterOpenCases) { case OpenClosedCases.Open: return(examination => (examination.CaseCompleted == false && examination.IsVoid == false)); case OpenClosedCases.ClosedOrVoid: return(examination => examination.CaseCompleted == true || examination.IsVoid == true); default: throw new ArgumentOutOfRangeException(nameof(paramFilterOpenCases), paramFilterOpenCases, null); } }
public ExaminationsRetrievalQuery( IEnumerable <string> permissedLocations, CaseStatus?filterCaseStatus, string filterLocationId, ExaminationsOrderBy?filterOrderBy, int filterPageNumber, int filterPageSize, string filterUserId, OpenClosedCases filterOpenCases) { PermissedLocations = permissedLocations; FilterCaseStatus = filterCaseStatus; FilterLocationId = filterLocationId; FilterOrderBy = filterOrderBy; FilterPageNumber = filterPageNumber; FilterPageSize = filterPageSize; FilterUserId = filterUserId; FilterOpenCases = filterOpenCases; }