mcintyre321/mvc.jquery.datatables — Issue #2: LINQ to Entities exception on search
Author: luposky
Created: 2012-02-09 11:44:50+00:00
State: open

Sorry, I get an exception using the search box:

LINQ to Entities does not recognize the method 'System.String ToString()' method, and this method cannot be translated into a store expression

in Mvc.JQuery.Datatables.DynamicLinq.DynamicQueryable.Count(IQueryable source)
in Mvc.JQuery.Datatables.DataTablesFilter.FilterPagingSortingSearch(DataTablesParam dtParameters, IQueryable data, Int32& totalRecordsDisplay, Tuple`2[] columns)
in Mvc.JQuery.Datatables.DataTablesResult`2.GetResults(IQueryable q, DataTablesParam param, Tuple`2[] searchColumns)
in Mvc.JQuery.Datatables.DataTablesResult`2..ctor(IQueryable`1 q, DataTablesParam dataTableParam, Func`2 transform)
in Mvc.JQuery.Datatables.DataTablesResult.Create[T,TRes](IQueryable`1 q, DataTablesParam dataTableParam, Func`2 transform)
in LizardSetup.Controllers.ResultController.GetResults(DataTablesParam dataTableParam) in (myfile.cs)

I installed the package with nuget, followed the sample ... the grid is working (paging, sorting) but using the seach box give the exception ...

Any info ? Thanks,
Best regards,
Luca