Skip to content

OData queries don't work #525

Closed
Closed
@ghost

Description

I have added a versioning in WebApi project. If I use OData queries such like this:
/api/v1/Object?$skip=1
the status 500 is returned with message:

No service for type 'Microsoft.AspNet.OData.Query.SkipTokenHandler' has been registered.

In WebApiConfig.cs I have added the following code:
config.AddApiVersioning();
builder = new VersionedODataModelBuilder(config)
{
ModelConfigurations = { new ObjectModelConfiguration() }
};
config.MapVersionedODataRoutes("odata", "api/v{apiVersion}", builder.GetEdmModels());

Before adding Microsoft.AspNet.OData.Versioning OData queries were working.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions