Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/naeemaei/aggriddynamicfilter

Angular AgGrid to C# dynamic linq expression
https://github.com/naeemaei/aggriddynamicfilter

aggrid angular asp-net-core csharp dynamic-filters filter

Last synced: 8 days ago
JSON representation

Angular AgGrid to C# dynamic linq expression

Awesome Lists containing this project

README

        

# AgGridDynamicFilter

## Dynamic filter from AgGrid to ASP.NET Core web api without any extra codes
Just need to pass DB model class and filter to generate expression function then pass expression to linq `Where` function

## Usage

```
public static IEnumerable GetAndFilterAndSort(AgGridPaginationFilterModel filter) // Filter fill in frontend
{
var expression = AgGridDynamicFilter.Extensions.GetExpression(filter);

return olympicWinners.Where(expression).DynamicOrderBy(filter);
}

```