I have added a DataSourceRequest POCO to simplify the obvious use of the DLinq Helpers in ASP.NET Web API (and maybe also ASP.NET MVC by using appropriate model binding). This simplifies the use on Web API controllers to:
[HttpPost]
public IHttpActionResult GetMyResources(DataSourceRequest request)
{
var myResources = _repository.GetAll;
return Ok(myResources.ToDataSourceResult(request));
}
Just a shortcut to prevent mapping out the take, skip, order, and filter parameters and passing them one-on-one to the ToDataSourceResult extension method.
I have added a DataSourceRequest POCO to simplify the obvious use of the DLinq Helpers in ASP.NET Web API (and maybe also ASP.NET MVC by using appropriate model binding). This simplifies the use on Web API controllers to:
Just a shortcut to prevent mapping out the take, skip, order, and filter parameters and passing them one-on-one to the ToDataSourceResult extension method.