I have a Grid read method that throws this error on the ToDataSourceResult line at the bottom.
The context.Search_All method is a SQL Stored Procedure in the context object.
Any suggestions?
public ActionResult Search_Read([DataSourceRequest]DataSourceRequest request, SearchInputModel input)
{
var username = _identityService.UserID;
using (var context = new eEntities.eWJB())
{
context.Configuration.ProxyCreationEnabled = false;
IQueryable search = context.Search_All("a", "b", "c", "d", "1", true)
.AsQueryable()
.Select( item => new SearchResultModel
{
ID1 = item.ID1,
ID2 = item.ID2,
1D3 = item.ID3,
Name= item.Name,
Name2= item.Name2});
var result = search.ToDataSourceResult(request); <--- Error Here
return Json(result, JsonRequestBehavior.AllowGet);
}
}
The context.Search_All method is a SQL Stored Procedure in the context object.
Any suggestions?
public ActionResult Search_Read([DataSourceRequest]DataSourceRequest request, SearchInputModel input)
{
var username = _identityService.UserID;
using (var context = new eEntities.eWJB())
{
context.Configuration.ProxyCreationEnabled = false;
IQueryable search = context.Search_All("a", "b", "c", "d", "1", true)
.AsQueryable()
.Select( item => new SearchResultModel
{
ID1 = item.ID1,
ID2 = item.ID2,
1D3 = item.ID3,
Name= item.Name,
Name2= item.Name2});
var result = search.ToDataSourceResult(request); <--- Error Here
return Json(result, JsonRequestBehavior.AllowGet);
}
}