When you have a VO using HasConversion like below, you need to do expressions in EF like x => x.Email == "thing" instead of x => x.Email.Value == "thing" vs using OwnsOne where you would always use the full path.
so ideally, the parser defaults to using the whole path, but if you pass a config object, the parser respects the path you give, so this:
var config = new QueryKitProcessorConfiguration(config =>
{
config.Property<TestingPerson>(x => x.Email).HasQueryName("email");
});
would really resolve to x => x.Email == "thing"
i started looking at this and found i can tack something like this into LeftExprParser , but then the type isn't recognized in CreateRightExpr when it calls TypeConversionFunctions, but you do need to know the type to do it right (e.g. if it's a guid or whatever)
// Check if the nested property has a child property
if (nestedPropertyExpression is MemberExpression memberExpression &&
memberExpression.Expression is MemberExpression parentExpression)
{
return parentExpression;
}
I think to make this work, i need to add a HasConversion() extension myself that essentially mimics the EF core method?
Problem
When you have a VO using HasConversion like below, you need to do expressions in EF like
x => x.Email == "thing"
instead ofx => x.Email.Value == "thing"
vs usingOwnsOne
where you would always use the full path.so ideally, the parser defaults to using the whole path, but if you pass a config object, the parser respects the path you give, so this:
would really resolve to
x => x.Email == "thing"
i started looking at this and found i can tack something like this into
LeftExprParser
, but then the type isn't recognized inCreateRightExpr
when it callsTypeConversionFunctions
, but you do need to know the type to do it right (e.g. if it's a guid or whatever)I think to make this work, i need to add a
HasConversion()
extension myself that essentially mimics the EF core method?