We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Using Linq to Entity Framework for Server Side Data Retrieveal

Hi,

My company (NCR) is currently evaluating some different control products for ASP.NET MVC. We like the feature that the DevExpress grid has, where Linq can be used to intelligently retrieve only the required data from the database when an operation such as filter, group, sort etc. is performed. I've played around with the Syncfusion grid, but have found that while Linq to Entity Framework can be used to retrieve data, there's no way to have Syncfusion automatically filter the query to add the appropriate Where clauses (this is what DevExpress does). I notice that the controller actions used for Syncfusion that return the grid's data source are expected to return a type of IEnumerable instead of IQueryable, so I assume this functionality isn't possible? Or am I missing something?

Cheers,

1 Reply

RD Rakesh D Syncfusion Team December 10, 2012 01:35 PM UTC

Hi Stefan,

 

Thank you for your interest in Syncfusion Products.

 

Query : Grid’s data source to return as IQueryable.

 

You can return the grid’s data source as IQueryable in controller action and perform your required operations on it. Please refer the below code for further details.

 

[Controller ]

public ActionResult Index()

        {

            IQueryable data = new NorthwindDataContext().Orders;

 

            return View(data);

        }

 

For your convenience we have prepared a sample for your requirement and it is attached below. Please refer the attached the sample.

 

Sample:

 

Please let us know if you have any concerns.

 

Regards,

Rakesh D

 



IQuerable Grid_797cd533.zip

Loader.
Live Chat Icon For mobile
Up arrow icon