ALMMa / datatables.aspnet

Microsoft AspNet bindings and automatic parsing for jQuery DataTables along with extension methods to help on data queries.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Could not create a model binder for model object of typeDataTables.AspNet.Core.IDataTablesRequest

hyuksel opened this issue · comments

Hi,

is this package compatible with DotNetCore 1.1?
I've made a test project in Visual Studio 2017RC and i'm getting the following error:

An unhandled exception occurred while processing the request.

InvalidOperationException: Could not create a model binder for model object of type 'DataTables.AspNet.Core.IDataTablesRequest'.

Microsoft.AspNetCore.Mvc.ModelBinding.ModelBinderFactory.CreateBinder(ModelBinderFactoryContext context)

Thanks. Hayko.

Looks like it's missing the needed binders which are made available through service registration for AspNet Core on Startup.cs. Please, take a look into the DataTables.AspNet registration:

Startup.cs (from samples)

Thanks!