alirezanet / Gridify

Easy and optimized way to apply Filtering, Sorting, and Pagination using text-based data.
https://alirezanet.github.io/Gridify/
MIT License
805 stars 64 forks source link

QueryBuilder build into a GridifyQuery #192

Open Alexr03 opened 1 month ago

Alexr03 commented 1 month ago

Details

I am using Gridify in a Blazor WASM application, right now I am having to build out the GridifyQuery filter & order strings by hand.

I think it would be nice if I could utilize the QueryBuilder which would contain a method that can build the instance of the QueryBuilder into a GridifyQuery using all the conditions etc that I provided to the builder.

alirezanet commented 1 month ago

Hi @Alexr03,

I don't think QueryBuilder is the best option for constructing the query, as it also manages the Mapper and other configurations. I'm not quite sure what problem you're trying to solve—if you're building the query on the client side, why do you need the GridifyQuery object? You could pass the QueryBuilder object around instead.

It would be great if you could explain a bit more or provide some code examples to clarify what you're trying to achieve.

Gridify has a JS/TS client-side QueryBuilder that helps generate the query. Are you looking for something similar in C#? https://alirezanet.github.io/Gridify/guide/extensions/gridify-client#usage-example

Alexr03 commented 1 month ago

Ahh yes, my apoligies I think I got myself mixed up with that QueryBuilder for JS/TS. Yes I am looking for a C# version of that.