AlexanderKrutov / DataTables.Queryable

.Net library for clever processing of requests from datatables.net jQuery plugin on the server side (ASP.NET, Nancy or any other web server).
MIT License
51 stars 19 forks source link

JsonDataTable not available? #11

Closed martypowell closed 6 years ago

martypowell commented 6 years ago

I searched through the repo and I couldn't find JsonDataTable method. any ideas?

AlexanderKrutov commented 6 years ago

@martypowell Hi Marty, JsonDataTable is a helper method used to convert IPagedList<T> to ASP.NET-specific JsonResult class. It does not included into the DataTables.Queryable library because it does not have dependencies from ASP.NET and can be used with any implementation of web server, for example, with Nancy. So it's a developer-related task to implement own converter from IPagedList<T> to Json response. You can find implementation of the JsonDataTable method here: https://github.com/AlexanderKrutov/DataTables.Queryable/blob/3cd5af9421c541ab96ebb79f7e99dcbc65223c6a/DataTables.Queryable.Samples/Controllers/DataTablesController.cs#L78

martypowell commented 6 years ago

@AlexanderKrutov awesome, thanks for the quick response, actually working on implementing my own right now 😄