public static Specification<Foo> OkCriteria(Boolean isOk)
{
if (isOk)
{
return new AdHocSpecification<Foo>(f => f.Bars.Where(br => br.Bazes.Where(bz =>
bz.Ok).Count() > 0).Count() > 0);
} else {
return new AdHocSpecification<Foo>(f => f.Bars.Where(br => br.Bazes.Where(bz =>
bz.Ok).Count() > 0).Count() == 0);
}
}
No comments:
Post a Comment