If it is your first MVC project then check the structure of application, Content (contains theme and css files), Controllers (contains our controller classes), Models (Models to use in view to pass values from page to controllers) and Views (page UI).To keep this article simple, we will use LINQ To SQL Classes to fetch data from database, so create LINQ To SQL Class by right clicking on the solution New Item.., it will open a dialog to add new item so select LINQ To SQL Classes and give name Open Sever Explorer from view menu and add your database, where you created your products table, say Northwind Drag Products table to the surface Our application structure is completed, now we will create our own controller.One thing I wanted to bring up with respect to performance is the usage of LINQ (Language Integrated Query) and our Rad Grid.Although LINQ has been out since the initial release of .What I wanted to display today is nothing new (we have some examples on our demo page which displays the usage of our Rad Grid and LINQ) but I still feel like it is necessary to show, perhaps in a slimmed down version with a bit of explanation, how easy it is to use LINQ.I know that some of you might look at LINQ with a bit of suspicion since it might look a bit cryptic to begin with - especially if you're used to MS SQL, but hopefully this blog post will help shed some light on the ease of use and performance gains you can receive from implementing it.
First, we will have to retrieve the ‘user’ object we want to delete, and then add this deletion operation in the queue by ‘Delete On Submit’ method.
The absolutely easiest way to use LINQ and our Rad Grid is to take use of the Linq Data Source which is provided by default within the . Some of you might be familiar with how easy it is to place a Sql Data Source on a page and use that with the Rad Grid - and it's basically just as easy with LINQ.
The first thing to do is of course to have a database to connect to! This can be found in the same directory as our local demos that come from an install of our controls, and it can be found in the following directory: [Installed Directory]\Telerik\Rad Controls for ASP. Just add this as an "existing item" in your App_Data folder: We now need to set up our LINQ to SQL connection, so if you right-click on your project and select Add New Item and under the Data menu item you will find the LINQ to SQL Classes item.
NET 3.5 I still receive quite a few questions when it comes to using it with our Rad Grid for ASP. The abbreviated answer is that yes, you can use LINQ in conjunction with our Rad Grid.
The somewhat longer version is the reason for this blog post!