Skip to content

Using Skip Token Handlers independently #2875

@JoseLimaIVD

Description

@JoseLimaIVD

Hi,

Please forgive me if the question is too simple, as I'm trying to understand the functionalities.

I have a scenario where I need to implement specific query parameters (mostly skiptoken and filter) and I was looking into using this library. However, the project is big enough that conforming to the EDM model/odatacontrollers is quite a bit of work. I was wondering if there is a simple way to reuse the handlers without needing to register/confirm to EDM models?

for example, for skip token, I have a custom logic for producing the skip token and fetching the next page from it, but if I were to override DefaultTokenHandler, that would require me to create an ODataSerializerContext and have it register with an edm routeprefix in the hostbuilder. ODataQueryOptions seems to correctly parse the queries so I think it would be nice if:

  1. I can configure services directly in the options (without needing to pass a routePrefix, modelBuilder)
  2. ApplyTo for SkipTokenHandler to allow me to pass a custom page fetching logic while reusing the uri building mechanisms in place (top/pagesize handling, conflict with other query parameters, etc)
  3. GenerateNextPageLink to don't depend on ODataSerializerContext

Does this makes sense? please let me know if there is a better way

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions