Skip to content

Instantly share code, notes, and snippets.

@cguldogan
Created February 2, 2022 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cguldogan/cc69ceb9af9047861c7ce9618fcdb9be to your computer and use it in GitHub Desktop.
Save cguldogan/cc69ceb9af9047861c7ce9618fcdb9be to your computer and use it in GitHub Desktop.
C# Query Filter Scaffold
namespace SampleProject.QueryFilters
{
public class QueryFilter
{
public Sorting Sorting { get; set; }
public Pagination Pagination { get; set; }
public List<Filter> Filters { get; set; }
}
public class Sorting
{
public string SortBy { get; set; }
public string SortDirection { get; set; } // "ASC" "DESC"
}
public class Pagination
{
public int CurrentPage { get; set; }
public int PageCount { get; set; }
public int Count { get; set; }
}
public class Filter
{
public string FilterBy { get; set; }
public string FilterValue { get; set; }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment