-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add custom whole condition alias support #38
Comments
This seems like business logic creeping in a bit, which seems smelly on first glance, but I'm potentially open to it. What api would you think for setting this up in the config? |
I thought of another example today that i think this would be useful for -- more like aggregate properties like creating a |
Hey there! I'm not sure about business logic creeping, you might be right. var input = $"""AdultMale == true"""; //Only handles true or false
var config = new QueryKitConfiguration(config =>
{
config.Filter<Person>(x => x.Age >= 18 && x.Gender == "Male")
.HasAliasName("AdultMale");
}); The reason I came up with this, is, I can have a readonly calculated property in an entity class that is ignored on the mapping to the DB (rather than having a Computed Column). In my example, the AdultMale is the property.
Thus the need for it to be translated to a query that the database can actually perform. |
I really need this feature |
PRs are welcomed if you want to contribute |
Hello,
How about we get support for an alias for a custom whole condition?
Like,
"""AdultMale == true"""
translating to""" Age >= 18 && Gender == "Male" """
The text was updated successfully, but these errors were encountered: