Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/leanwit/filtersbycriteria

The current repository shows an implementation of filtering by Criteria using a DDD approach
https://github.com/leanwit/filtersbycriteria

criteria criteria-api csharp dotnet

Last synced: 11 days ago
JSON representation

The current repository shows an implementation of filtering by Criteria using a DDD approach

Awesome Lists containing this project

README

        

# Filters By Criteria example
The current repository shows an implementation of filtering by Criteria using a DDD approach

## How to run
Execute the following command on the root folder

``dotnet build & dotnet run --project apps/WebApi/WebApi.csproj``

## Examples
### Order
``https://localhost:5001/items?order=desc&order_by=name``

### Limit
``https://localhost:5001/items?limit=10``

### Offset
``https://localhost:5001/items?offset=5``

### Fields
``https://localhost:5001/items?filters[0][field]=name&filters[0][operator]=CONTAINS&filters[0][value]=item``

## Field operators
````
EQUAL = "=="
NOT_EQUAL = "!="
GT = ">"
LT = "<"
CONTAINS = "CONTAINS"
NOT_CONTAINS = "NOT_CONTAINS"
````