@@ -169,7 +169,7 @@ from e4 in context.Set<OperatorEntityLong>()
169
169
from e5 in context . Set < OperatorEntityLong > ( )
170
170
orderby e3 . Id , e4 . Id , e5 . Id
171
171
select ( ( ~ ( - ( - ( ( e5 . Value + e3 . Value ) + 2 ) ) ) % ( - ( e4 . Value + e4 . Value ) - e3 . Value ) ) ) ) . ToList ( ) ;
172
-
172
+
173
173
Assert . Equal ( expected . Count , actual . Count ) ;
174
174
for ( var i = 0 ; i < expected . Count ; i ++ )
175
175
{
@@ -267,4 +267,38 @@ public virtual async Task Negate_on_like_expression(bool async)
267
267
Assert . Equal ( expected [ i ] , actual [ i ] ) ;
268
268
}
269
269
}
270
+
271
+ #nullable enable
272
+ [ ConditionalTheory ]
273
+ [ MemberData ( nameof ( IsAsyncData ) ) ]
274
+ public virtual async Task Concat_and_json_scalar ( bool async )
275
+ {
276
+ var contextFactory = await InitializeAsync < DbContext > (
277
+ onModelCreating : mb => mb
278
+ . Entity < Owner > ( )
279
+ . OwnsOne ( o => o . Owned )
280
+ . ToJson ( ) ,
281
+ seed : context =>
282
+ {
283
+ context . Set < Owner > ( ) . AddRange (
284
+ new Owner { Owned = new ( ) { SomeProperty = "Bar" } } ,
285
+ new Owner { Owned = new ( ) { SomeProperty = "Baz" } } ) ;
286
+ context . SaveChanges ( ) ;
287
+ } ) ;
288
+ await using var context = contextFactory . CreateContext ( ) ;
289
+
290
+ var result = await context . Set < Owner > ( ) . SingleAsync ( o => "Foo" + o . Owned . SomeProperty == "FooBar" ) ;
291
+ Assert . Equal ( "Bar" , result . Owned . SomeProperty ) ;
292
+ }
293
+
294
+ class Owner
295
+ {
296
+ public int Id { get ; set ; }
297
+ public Owned Owned { get ; set ; } = null ! ;
298
+ }
299
+
300
+ class Owned
301
+ {
302
+ public string SomeProperty { get ; set ; } = "" ;
303
+ }
270
304
}
0 commit comments