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.
Unfortunately, activation email could not send to your email. Please try again.

Using Linq to Entity Framework for Server Side Data Retrieveal

Thread ID:

Created:

Updated:

Platform:

Replies:

105988 Dec 3,2012 06:23 PM Dec 10,2012 08:35 AM ASP.NET MVC (Classic) 1
loading
Tags: Grid
Stephen Nield
Asked On December 3, 2012 06:23 PM

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,

Rakesh D [Syncfusion]
Replied On December 10, 2012 08:35 AM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;