Open antonGritsenko opened 6 months ago
Connected with #11566 and #10662
OData should somehow use this instead ExtraProperties:
var query = (await GetQueryableAsync()).Where(u => EF.Property<string>(u, "SocialSecurityNumber") == "123");
After a lot of digging, I can definitely say that OData support in ABP is not possible because of Extra Property feature. There is no support for this in AutoMapper and in OData library itself. You can build OData for your own entities, but not for OOB. Issue:
Funny fact that both, EFCore and OData, have support for it, but libraries above just do not implement this.
ABP Framework >= 6.0
Some issues mentioned "support" of the OData (like this or this), but the real app doesn't work.
The problem is extended properties and injection made into the LINQ by ABP.
Image code like this (using DBContext just for simplicity):
That will work and you even can do a very simple query like $filter=name eq 'John'. But as soon as you want to use any "extended" (from ABP point of view) properties like UserName (I have no idea why it counts it as Extended, to be honest) you will get error like this: