Details
Description
Support nested member init projections:
[Test] public void TestSelectMemberInitSupportsFields1() { var res = PocoView.AsQueryable() .Where(x => x.Key == 2) .Select(x => new MyClass1 { Key = x.Key, Class2Prop = new MyClass2 { Value = x.Val } }) .ToArray(); Assert.AreEqual(1, res.Length); var resRow = res[0]; } private class MyClass1 { public long Key { get; set; } public MyClass2 Class2Prop { get; set; } = null!; } private class MyClass2 { public string? Value { get; set; } }
Also check possibility to combine with anonymous types.
Attachments
Issue Links
- is caused by
-
IGNITE-18120 .NET: Thin 3.0: Allow arbitrary MemberInit projections in LINQ
- Resolved