public async Task Or() { using (var repo = GetRepository()) { var spec = new UserIsAgeOfMajority(18).Or(new UserHasGender(Gender.Male)); (await repo.ListAsync(spec).ConfigureAwait(false)).Count().Should().Be(4); } }
public void Visit(UserIsAgeOfMajority spec) { var initialDate = DateTime.Today.AddYears(-spec.MajorityAge); Expr = ef => ef.Birthday <= initialDate; }