Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow EnableQueryAttribute derived classes to specify IgnoreQueryOptions #2648

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 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
5 changes: 5 additions & 0 deletions src/Microsoft.AspNet.OData.Shared/EnableQueryAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,11 @@ public int MaxOrderByNodeCount
}
}

/// <summary>
/// Gets the query settings.
/// </summary>
protected ODataQuerySettings QuerySettings => _querySettings;
ificator marked this conversation as resolved.
Show resolved Hide resolved

/// <summary>
/// Performs the query composition after action is executed. It first tries to retrieve the IQueryable from the
/// returning response message. It then validates the query from uri based on the validation settings on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,7 @@ public class Microsoft.AspNet.OData.EnableQueryAttribute : System.Web.Http.Filte
int MaxSkip { public get; public set; }
int MaxTop { public get; public set; }
int PageSize { public get; public set; }
ODataQuerySettings QuerySettings { protected get; }

public virtual System.Linq.IQueryable ApplyQuery (System.Linq.IQueryable queryable, ODataQueryOptions queryOptions)
public virtual object ApplyQuery (object entity, ODataQueryOptions queryOptions)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,7 @@ public class Microsoft.AspNet.OData.EnableQueryAttribute : Microsoft.AspNetCore.
int MaxSkip { public get; public set; }
int MaxTop { public get; public set; }
int PageSize { public get; public set; }
ODataQuerySettings QuerySettings { protected get; }

public virtual System.Linq.IQueryable ApplyQuery (System.Linq.IQueryable queryable, ODataQueryOptions queryOptions)
public virtual object ApplyQuery (object entity, ODataQueryOptions queryOptions)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,7 @@ public class Microsoft.AspNet.OData.EnableQueryAttribute : Microsoft.AspNetCore.
int MaxSkip { public get; public set; }
int MaxTop { public get; public set; }
int PageSize { public get; public set; }
ODataQuerySettings QuerySettings { protected get; }

public virtual System.Linq.IQueryable ApplyQuery (System.Linq.IQueryable queryable, ODataQueryOptions queryOptions)
public virtual object ApplyQuery (object entity, ODataQueryOptions queryOptions)
Expand Down