Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 INFRAGISTICS

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
23 changes: 1 addition & 22 deletions ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,12 @@ A .NET 8, .NET 9 library for dynamic, strongly-typed query building and executio

[![NuGet](https://img.shields.io/nuget/v/Infragistics.QueryBuilder.Executor.svg)](https://www.nuget.org/packages/Infragistics.QueryBuilder.Executor/)

---

## Installation

Install via NuGet Package Manager:

`dotnet add package Infragistics.QueryBuilder.Executor`


---

## Features

- **Dynamic Query Execution**: Compose and execute queries at runtime using a flexible object model.
Expand All @@ -23,8 +18,6 @@ Install via NuGet Package Manager:
- **SQL Generation**: Generate SQL from the query model for diagnostics or analysis.
- **ASP.NET Core Integration**: Easily expose query endpoints.

---

## Getting Started

### 1. Register the QueryBuilder Service
Expand All @@ -33,45 +26,31 @@ In your `Startup.cs` or Program configuration:

`services.AddQueryBuilder<MyDbContext, MyResultDto>();`


### 2. Expose a Query Endpoint

`app.UseEndpoints(endpoints => { endpoints.UseQueryBuilder<MyDbContext, MyResultDto>("/api/query"); });`


### 3. Example Query Payload

`{ "Entity": "Users", "ReturnFields": ["Id", "Name"], "Operator": "And", "FilteringOperands": [ { "FieldName": "IsActive", "Condition": { "Name": "equals" }, "SearchVal": true } ] }`


### 4. Generate SQL (Optional)

`var sql = SqlGenerator.GenerateSql(query);`


---

## Query Model

- **Query**: Describes the entity, fields, logical operator, and filters.
- **QueryFilter**: Represents a filter or group of filters.
- **QueryFilterCondition**: Specifies the comparison type (e.g., equals, contains).

---

## Dependencies

- .NET 8 or .NET 9
- Microsoft.EntityFrameworkCore
- AutoMapper
- builder.Services.AddControllers().AddNewtonsoftJson(o => o.SerializerSettings.ReferenceLoopHandling = ReferenceLoopHandling.Ignore) for working SwaggerUI

---

## License

This package is provided as-is for public and demonstration use.

---

*For more details, see the source code or contact the maintainers.*
[MIT](/LICENSE).
Loading