Details
Description
Ignite LINQ provider allows anonymous type projections:
query.Select(emp => new {Id = emp.Key, Name = emp.Value.Name});
However, it does not work with a custom class:
query.Select(emp => new Foo {Id = emp.Key, Name = emp.Value.Name});
throws exception:
System.NotSupportedException : The expression 'new Foo() {Id = [x].Key}' (type: System.Linq.Expressions.MemberInitExpression) is not supported.
Add VisitMemberInit overload to CacheQueryExpressionVisitor to support this scenario. See linked SO page for more details - there is a proposed fix as well.
Attachments
Issue Links
- is cloned by
-
IGNITE-18120 .NET: Thin 3.0: Allow arbitrary MemberInit projections in LINQ
- Resolved
- links to