I am using MudBlazor Datagrid, and populating the data using ServerData. Here I get the list of filters, sorts from GridState object, which are in ICollection.
I am using a Repository and UnitOfWork pattern, which requires ‘where clause’ to be defined as
public virtual IEnumerable<TEntity> Get(
Expression<Func<TEntity, bool>> filter = null, Func<IQueryable<TEntity>,
IOrderedQueryable<TEntity>> orderBy = null,
string includeProperties = "",
int skip = 0,
int take = 0,
string filterString = "")
{ ...
For the filters and sorting to work in my implementation I need to pass the FilterDefinitions ICollection and SortDefinitions ICollection in the format above. Can you please guide me on how to achieve this.
All of my research guides me how to add new filters or sort criterias. But I need to fetch the applied filters and pass to the above function.
Agraj Agranayak is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.