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:

Linq_html_code

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:
linq_dbml

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

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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s