示例#1
0
 private static Expression <Func <Patient, bool> > AgeExpression(ushort?yearOfBirth)
 {
     return(patient => !yearOfBirth.HasValue ||
            (patient.YearOfBirth.HasValue &&
             AgeGroupMatcher.IsMatching(AgeCalculator.From(yearOfBirth.Value),
                                        AgeCalculator.From(patient.YearOfBirth.Value))));
 }