@@ -92,9 +92,12 @@ await AssertQuery(
9292 }
9393
9494 [ ConditionalTheory ]
95- public override async Task Where_datetime_year_component ( bool async )
95+ [ MemberData ( nameof ( IsAsyncData ) ) ]
96+ public virtual async Task Where_datetime_year_component ( bool async )
9697 {
97- await base . Where_datetime_year_component ( async) ;
98+ await AssertQuery (
99+ async ,
100+ ss => ss. Set < Order > ( ) . Where ( o => o . OrderDate . Value . Year == 1998 ) ) ;
98101
99102 AssertSql (
100103 @"SELECT `o`.`OrderID`, `o`.`CustomerID`, `o`.`EmployeeID`, `o`.`OrderDate`
@@ -103,9 +106,12 @@ public override async Task Where_datetime_year_component(bool async)
103106 }
104107
105108 [ ConditionalTheory ]
106- public override async Task Where_datetime_month_component ( bool async )
109+ [ MemberData ( nameof ( IsAsyncData ) ) ]
110+ public virtual async Task Where_datetime_month_component ( bool async )
107111 {
108- await base . Where_datetime_month_component ( async) ;
112+ await AssertQuery (
113+ async ,
114+ ss => ss. Set < Order > ( ) . Where ( o => o . OrderDate . Value . Month == 4 ) ) ;
109115
110116 AssertSql (
111117 @"SELECT `o`.`OrderID`, `o`.`CustomerID`, `o`.`EmployeeID`, `o`.`OrderDate`
@@ -114,9 +120,12 @@ public override async Task Where_datetime_month_component(bool async)
114120 }
115121
116122 [ ConditionalTheory ]
117- public override async Task Where_datetime_dayOfYear_component ( bool async )
123+ [ MemberData ( nameof ( IsAsyncData ) ) ]
124+ public virtual async Task Where_datetime_dayOfYear_component ( bool async )
118125 {
119- await base . Where_datetime_dayOfYear_component ( async) ;
126+ await AssertQuery (
127+ async ,
128+ ss => ss. Set < Order > ( ) . Where ( o => o . OrderDate . Value . DayOfYear == 68 ) ) ;
120129
121130 AssertSql (
122131 @"SELECT `o`.`OrderID`, `o`.`CustomerID`, `o`.`EmployeeID`, `o`.`OrderDate`
@@ -125,9 +134,12 @@ public override async Task Where_datetime_dayOfYear_component(bool async)
125134 }
126135
127136 [ ConditionalTheory ]
128- public override async Task Where_datetime_day_component ( bool async )
137+ [ MemberData ( nameof ( IsAsyncData ) ) ]
138+ public virtual async Task Where_datetime_day_component ( bool async )
129139 {
130- await base . Where_datetime_day_component ( async) ;
140+ await AssertQuery (
141+ async ,
142+ ss => ss. Set < Order > ( ) . Where ( o => o . OrderDate . Value . Day == 4 ) ) ;
131143
132144 AssertSql (
133145 @"SELECT `o`.`OrderID`, `o`.`CustomerID`, `o`.`EmployeeID`, `o`.`OrderDate`
@@ -136,9 +148,12 @@ public override async Task Where_datetime_day_component(bool async)
136148 }
137149
138150 [ ConditionalTheory ]
139- public override async Task Where_datetime_hour_component ( bool async )
151+ [ MemberData ( nameof ( IsAsyncData ) ) ]
152+ public virtual async Task Where_datetime_hour_component ( bool async )
140153 {
141- await base . Where_datetime_hour_component ( async) ;
154+ await AssertQuery (
155+ async ,
156+ ss => ss. Set < Order > ( ) . Where ( o => o . OrderDate . Value . Hour == 0 ) ) ;
142157
143158 AssertSql (
144159"""
@@ -149,9 +164,12 @@ WHERE EXTRACT(hour FROM `o`.`OrderDate`) = 0
149164 }
150165
151166 [ ConditionalTheory ]
152- public override async Task Where_datetime_minute_component ( bool async )
167+ [ MemberData ( nameof ( IsAsyncData ) ) ]
168+ public virtual async Task Where_datetime_minute_component ( bool async )
153169 {
154- await base . Where_datetime_minute_component ( async) ;
170+ await AssertQuery (
171+ async ,
172+ ss => ss. Set < Order > ( ) . Where ( o => o . OrderDate . Value . Minute == 0 ) ) ;
155173
156174 AssertSql (
157175"""
@@ -162,9 +180,12 @@ WHERE EXTRACT(minute FROM `o`.`OrderDate`) = 0
162180 }
163181
164182 [ ConditionalTheory ]
165- public override async Task Where_datetime_second_component ( bool async )
183+ [ MemberData ( nameof ( IsAsyncData ) ) ]
184+ public virtual async Task Where_datetime_second_component ( bool async )
166185 {
167- await base . Where_datetime_second_component ( async) ;
186+ await AssertQuery (
187+ async ,
188+ ss => ss. Set < Order > ( ) . Where ( o => o . OrderDate . Value . Second == 0 ) ) ;
168189
169190 AssertSql (
170191"""
@@ -175,9 +196,12 @@ WHERE EXTRACT(second FROM `o`.`OrderDate`) = 0
175196 }
176197
177198 [ ConditionalTheory ]
178- public override async Task Where_datetime_millisecond_component ( bool async )
199+ [ MemberData ( nameof ( IsAsyncData ) ) ]
200+ public virtual async Task Where_datetime_millisecond_component ( bool async )
179201 {
180- await base . Where_datetime_millisecond_component ( async) ;
202+ await AssertQuery (
203+ async ,
204+ ss => ss. Set < Order > ( ) . Where ( o => o . OrderDate . Value . Millisecond == 0 ) ) ;
181205
182206 AssertSql (
183207"""
0 commit comments