dbelmont/ExpressionBuilder

Build Expressions from Anonymous Types

whizkidwwe1217 opened this issue · 1 comments

There are instances where I need to make projections in Entity Framework. However, projections are anonymous types. For example:
Context.Set<Person>().Select(e=> new { e.Id, e.Code, e.FirstName, e.LastName }).Where(<pass_expression_here>);
Is it possible to build expressions when the source is an anonymous type?

Hi @whizkidwwe1217,
Thanks for using the project. 😄
That's a very intriguing question. 🤔 I'll have a look and keep you posted on what I find.
Cheers.