using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web.Mvc; using System.Collections.ObjectModel; namespace jQuery.DataTables.Mvc { public static class ControllerExtensions { public static JsonResult DataTablesJson(this Controller controller, IEnumerable items, int totalRecords, int totalDisplayRecords, int sEcho, ReadOnlyCollection sSearch_) { var result = new JsonResult(); result.Data = new JQueryDataTablesResponse(items, totalRecords, totalDisplayRecords, sEcho, sSearch_); return result; } public static JsonResult DataTablesJson(this Controller controller, IEnumerable items, int totalRecords, int totalDisplayRecords, int sEcho) { var result = new JsonResult(); result.Data = new JQueryDataTablesResponse(items, totalRecords, totalDisplayRecords, sEcho); return result; } } }