|
131 | 131 | new Person { Name = "Jack", TestInt = 9, DateOfBirth = GetDateWithSameMonthDay(GetRandomYear()), _Age = 37, GUIY = Guid.NewGuid(), DoNotMapTest = "I have a drug problem", Access = Person.Permissions.CanRead|Person.Permissions.CanWrite}, |
132 | 132 | new Person { Name = "Cathy", TestInt = 9, DateOfBirth = GetDateWithSameMonthDay(GetRandomYear()), _Age = 22, GUIY = Guid.NewGuid(), DoNotMapTest = "I got away with reading Bobs diary.", Access = Person.Permissions.CanRead | Person.Permissions.CanWrite}, |
133 | 133 | new Person { Name = "Bob", TestInt = 3 , DateOfBirth = GetDateWithSameMonthDay(GetRandomYear()), _Age = 69, GUIY = Guid.NewGuid(), DoNotMapTest = "I caught Cathy reading my diary, but I'm too shy to confront her.", Access = Person.Permissions.CanRead }, |
134 | | - new Person { Name = "Alex", TestInt = 3 , DateOfBirth = GetDateWithSameMonthDay(GetRandomYear()), _Age = 80, GUIY = Guid.NewGuid(), DoNotMapTest = "I'm naked! But nobody can know!" }, |
| 134 | + new Person { Name = "Alex", TestInt = 3 , DateOfBirth = null, _Age = 80, GUIY = Guid.NewGuid(), DoNotMapTest = "I'm naked! But nobody can know!" }, |
135 | 135 | new Person { Name = "Zapoo", DateOfBirth = null, TestInt = 9, _Age = 45, GUIY = Guid.NewGuid(), DoNotMapTest = "I buried treasure behind my house", Access=Person.Permissions.CanRead}, |
136 | 136 |
|
137 | 137 | }; |
|
151 | 151 | // || x.Name.Contains("bo", StringComparison.OrdinalIgnoreCase) |
152 | 152 | // ).OrderBy(x => x._Id).Skip(1).AsAsyncEnumerable()).ToListAsync(); |
153 | 153 |
|
154 | | - // WhereExample = (await manager.Where<Person>(x => x.Name.StartsWith("c", StringComparison.OrdinalIgnoreCase) |
155 | | - // || x.Name.StartsWith("l", StringComparison.OrdinalIgnoreCase) |
156 | | - // || x.Name.StartsWith("j", StringComparison.OrdinalIgnoreCase) && x._Age > 35 |
157 | | - // || x.Name.Contains("bo", StringComparison.OrdinalIgnoreCase) |
158 | | - // //|| (x.DateOfBirth != null && x.DateOfBirth.GetValueOrDefault().Year < 1980) |
159 | | - // || x.DateOfBirth == null |
160 | | - // ).OrderBy(x => x._Id).Skip(1).ToListAsync()); |
| 154 | + WhereExample = (await manager.Where<Person>(x => x.Name.StartsWith("c", StringComparison.OrdinalIgnoreCase) |
| 155 | + || x.Name.StartsWith("l", StringComparison.OrdinalIgnoreCase) |
| 156 | + || x.Name.StartsWith("j", StringComparison.OrdinalIgnoreCase) && x._Age > 35 |
| 157 | + || x.Name.Contains("bo", StringComparison.OrdinalIgnoreCase) |
| 158 | + //|| (x.DateOfBirth != null && x.DateOfBirth.GetValueOrDefault().Year < 1980) |
| 159 | + //|| x.DateOfBirth == null |
| 160 | + ).OrderBy(x => x._Id).Skip(1).ToListAsync()); |
| 161 | + |
| 162 | + // WhereExample = (await manager.Where<Person>(x => x.DateOfBirth != null |
| 163 | + // ).ToListAsync()); |
| 164 | +
|
| 165 | + // WhereExample = (await manager.Where<Person>(x => x.DateOfBirth != null |
| 166 | + // ).ToListAsync()); |
| 167 | +
|
| 168 | + |
| 169 | + // WhereExample = (await manager.Where<Person>(x => x.TestInt > 0 |
| 170 | + // ).OrderBy(x => x._Id).Skip(1).Take(1).ToListAsync()); |
161 | 171 |
|
162 | | - WhereExample = (await manager.Where<Person>(x => x.DateOfBirth == null |
163 | | - ).OrderBy(x => x._Id).Skip(1).Take(6).ToListAsync()); |
164 | 172 |
|
165 | 173 | /* |
166 | 174 | * Still working on allowing nested |
|
0 commit comments