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
- causes
-
IGNITE-19260 .NET: Thin 3.0: Support nested MemberInit projections in LINQ
- Open
- is a clone of
-
IGNITE-14343 .NET: Allow arbitrary MemberInit projections in LINQ
- Open
- is blocked by
-
IGNITE-17343 .NET: Thin 3.0: LINQ provider
- Resolved
- relates to
-
IGNITE-19256 .NET: Thin 3.0: Document MemberInit projections in LINQ
- Open
- links to
(1 links to)