Skip to content
This repository was archived by the owner on Jan 8, 2024. It is now read-only.
This repository was archived by the owner on Jan 8, 2024. It is now read-only.

Using the generic type 'DataTablesJsonResult<TDataType>' requires 1 type arguments error #92

@ghost

Description

I'm attempting to upgrade a project from .NET Core 3.1 to 6.0 and using [3.0.0-preview.19] of DataTables.AspNet.Core and DataTables.AspNet.AspNetCore.

A new error popped up on the upgrade and I'm not quite sure what it is asking for. My code that worked with .NET 3.1 and a previous 2.x package looks like this:

        public DataTablesJsonResult DataTablesGet([ModelBinder(typeof(DataTables.AspNet.AspNetCore.ModelBinder))] IDataTablesRequest requestModel)
        {
            if(requestModel == null)
            {
                return new DataTablesJsonResult(null, true);
            }

[...]
            var dtResponse = DataTablesResponse.Create(requestModel, totalCount, filteredCount, data);
            return new DataTablesJsonResult(dtResponse, true);
        }
    }

This error is created on both DataTablesJsonResult usages and the DataTableResponse.Create use. What am I missing?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions