Skip to content

Latest commit

 

History

History
45 lines (32 loc) · 1.44 KB

README.md

File metadata and controls

45 lines (32 loc) · 1.44 KB

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));
    }
}