LinqDatasource A Great Control for declarative programming
I have used data source control many times and its great it provides us great features for declarative binding. LinqDataSource Control is a great control and it allows us to bind linq queries without writing any code declaratively. Let’s create a example in that example I am not going to write a single line of code and we are going to create view,Update and Delete functionality. So first we need a table which will have data. So, I am going to use the same table which I have used in my old posts. Below is the table structure for this example.
Let’s insert some data for that table structure. I have already inserted it in previous example.Just like below.
Now,
To bind a linqdatasource we need a Linq-To-SQL Data context class Let’s create it via Project->Right Click->Add New Item –>Go to data tab->Linq-To-SQL classes Just like following.
After that I have just dragged user data to my data context just like following.