Sample Application Demonstrating LINQ

Assalamualaykum Wr Br…Today we build simple Web Application which demonstrates insertion of data from UI to data table without using Connection, Command class but using LINQ(Language Integrated Query).

Lets quick start our building by designing the Form as shown belowLinq_desing_form

Associated HTML code is shown as:


Now Drag & Drop the dbml file which creates the DataContext Class with various methods and properties. It also creates class as similar to our table which is shown below:

Now the Button_Click event code is shown below:
The above code generates the following output as shown below:

Thats all for the Day!!!…Happy Coding…Jazakallah Khair
Which generates the following output as shown below:


Working With ADO.NET – 1

Assalamualaykum Wr Br…Today we start our journey towards ADO.NET. ADO refers to ActiveX Data Object
ADO.NET provides a bridge between the front end controls and the back end database. The ADO.NET objects encapsulate all the data access operations and the controls interact with these objects to display data, thus hiding the details of movement of data.

The following figure shows the ADO.NET objects at a glance:

We start a sample application that demonstrates the connection establishment to Database from Front-End.
Design the UI as follows:
The following code demonstrates the logic:
The output can be shown as:
Hope you Enjoyed the journey first phase..There’s a lot more…till then Enjoy coding…