QueryBuilder is a lightweight utility for dynamically composing LINQ queries in Entity Framework Core. It simplifies filtering, sorting, and pagination logic.
var query = new QueryBuilder(db.Users) .Where("Age", ">", 18) .OrderBy("LastName") .Skip(10) .Take(20) .Build() .ToList(); //Returns users over 18, sorted by last name, paginated
Modern APIs often require dynamic filtering, sorting, and pagination. QueryBuilder standardizes this logic, reducing boilerplate and improving consistency across endpoints.
- Provide a fluent API for dynamic query composition
- Support
Where
,OrderBy
,Skip
, andTake
out of the box - Allow JSON-based query definitions for frontend integration
- Keep the tool lightweight , dependency-free , and EF-Core friendly
- No support for complex joins or groupings , frontend integration , orderBy dynamic properties , advanced filters with nested properties in the initial release
This is a small , evolving project. If you'd like to contribute:
- Feel free to fork the repo and submit a pull request with clear description
- No formal release or branching rules yet - Please keep the 'master' branch stable
- If you are adding new features, consider updating the README with example
- For questions or ideas , feel free to open an issue.
- Use .NET 8.0/C# 12