Category Archive for: LINQ to SQL

Querying the Database

As you’ve seen, there are a number of ways in which you can query the database from the code of your application, In some of the simplest forms, your queries looked like the following: Table<Product> query = dc.Products; This command was pulling down the entire Products table to your query object instance. Using Query Expressions In…

Read More →

Custom Objects and the O/R Designer

In addition to building your custom object in your own cs file and then tying that class·to the DataContext that you have built, you can also use the O/R Designer in Visual Studio 2008 to build your class files, When you use Visual Studio in this manner, it will create the appropriate cs file on your behalf, but…

Read More →

Working Without the O/R Designer

Although the new O/R Designer in Visual Studio 2008 makes the creation of everything you need for LINQ to SQL quite easy, it is important to note that the underlying framework upon which this all rests allows you to do everything from the ground up yourself, This provides the most control over the situation and what is actually…

Read More →

How Objects Map to LINQ Objects

The great thing about LINQ is that it gives you strongly typed objects to use in your code (with IntelliSense) and these objects map to existing database objects, Again, LINQ is nothing more than a thin facade over these pre-existing database objects, The following table shows the mappings that are between the database objects and the LINQ objects.…

Read More →

LINQ to SQL and Visual Studio 2008

LlNQ to SQL in particular is a means to have a strongly typed interface against a SQL Server database, You will find the approach that LlNQ to SQL provides is by far the easiest approach to querying SQL Server available at the moment. It is not just simply about querying single tables within the database, but, for instance,…

Read More →


Probably the biggest and most exciting addition to the .NET Framework 3.5 is the addition of the .NET Language Integrated Query Framework (LINQ) into C# 2008.Basically, what LINQ provides is a lightweight facade over programmatic data integration, This is such a big deal because data is king. Pretty much every application deals with data in some manner,…

Read More →

Back to Top