Skip to content

This library provides a way to construct Telerik.DataSourceRequest from route parameters.

License

Notifications You must be signed in to change notification settings

wxjv99/telerik-datasource-mvc-binder

Repository files navigation

Telerik datasource mvc binder

NuGet NuGet

This library provides a way to construct Telerik.DataSourceRequest from route parameters, so you don't need to reference and pass Kendo.Mvc.UI.DataSourceRequest in multiple layers of your project.

Getting Started

Installation Guide

Step1 You should install NuGet Package

In Visual Studio

Install-Package TelerikDS.Mvc.Binder

Or using .NET Core CLI

dotnet add package TelerikDS.Mvc.Binder

Step2 Using namespace (you can write it in GlobalUsings.cs)

using DataSourceRequestAttribute = TelerikDS.Mvc.Binder.DataSourceRequestAttribute;

(Note: In the old 1.x version, namespace start with Telerik.DataSource.Mvc.Binder.)

Usage

Mark [DataSourceRequest] attribute on your parameter

public class HomeController : Controller
{
    // ...

    public async Task<IActionResult> GetDataSourceAsync([DataSourceRequest] DataSourceRequest dsRequest)
    {
        return Json(await _dataSourceService.GetDataSourceAsync(dsRequest));
    }
}

About

This library provides a way to construct Telerik.DataSourceRequest from route parameters.

Resources

License

Stars

Watchers

Forks