Technology Articles

The science of today is the technology of tomorrow. Browse Technology related articles.

Dot. NET Articles

Browse the Dot.NET technical articles.

Web Design & Development

Browse Web Design & Development Articles which includes Technologies of Drupal, Joomla, CodeIgnitor, JQUERY, CMS, etc.

Health Articles

Browse Health Tips & Articles

Showing posts with label LINQ. Show all posts
Showing posts with label LINQ. Show all posts

Friday, March 12, 2010

Using LINQ to SQL Template - Part Two


This post has reference to part one of this Article.

Create a new Class with the name "MyLinq". We are going to use the DataContextFactory Class which we created in Part One. Also assume in our database we have Table with name "User" and with the following Definition.

Wednesday, March 10, 2010

Using LINQ to SQL Template - Part One


LINQ to SQL is a component of the .NET Framework version 3.5. Click to learn more about LINQ to SQL

First of all, in your Project or Website, add a new item from the "LINQ to SQL" template. This will create a file with extention ".dbml" and code behind files. Now from Server Explorer, drag and drop the required Tables from the DB. At this point, we will be able to save the Server Connection String to connect to the Database automatically. If its a Web application, it will be saved in web.config and for Windows Project, it will be saved in Settings.settings file.