Using Microsoft.Linq.Translations (to implement computed properties), I can call
I've used this method of computing relational properties to return such things as the latest Login for the User (which has a set of Logins) and to add calculated fields (compatible with efficient server-side filtering, sorting and grouping) to the UI while keeping the business logic in one place.
I'd like to implement this change in EF6.
As a proof-of-concept, I added
EF team: From a design point of view, is there a preferred way of implementing intercepting filter(s) in EF6? An event with a
Apart from the references in the original post, this change would also support a DRY alternative to some use cases for Extension Method Support In Lambda expression.
.WithTranslation()
on the IQueryable
or Expression
.I've used this method of computing relational properties to return such things as the latest Login for the User (which has a set of Logins) and to add calculated fields (compatible with efficient server-side filtering, sorting and grouping) to the UI while keeping the business logic in one place.
I'd like to implement this change in EF6.
As a proof-of-concept, I added
expression = Microsoft.Linq.Translations.ExpressiveExtensions.WithTranslations(expression);
to ExpressionConverter()
just below the DebugCheck
lines, and the result was, as expected, that I didn't need to call .WithTranslation()
everywhere else.EF team: From a design point of view, is there a preferred way of implementing intercepting filter(s) in EF6? An event with a
ref Expression
parameter? Virtual function on DbContext
and ObjectContext
? I lean towards virtual function, because the implementer of the derived classes knows best what changes need to be made to the Expression
to make the context work properly.Apart from the references in the original post, this change would also support a DRY alternative to some use cases for Extension Method Support In Lambda expression.