Use LINQPad to Help Understand LINQ Queries

I found an interesting program a few days ago called LINQPad. LINQPad lets your write LINQ queries against a SQL database, XML File, or other objects. The developers wrote a book called C# 3.0 in a Nutshell, and they provide over 200 code examples from the book in the LINQPad application.

I tried LINQPad, and found [...]

Read Users' Comments (0)

LINQ to SQL Database Trigger Bug – Workaround

There is a bug with LINQ to SQL when inserting a record with an ID column that is of type uniqueidentifier, and uses a trigger to on Insert/Update, and you request the new ID to be returned by LINQ. So, the following three conditions must be met to recreate the bug:

ID Column is type uniqueidentifier
Table [...]

Read Users' Comments (0)

Tutorial Reading A Text File Using LINQ to Objects

Introduction

At times us developers have to deal with delimited text files in our
applications. Such files have been around forever and I often come
across data import/export tasks where delimited files are used. The common way in .NET has been to read each line and then extract
data using some sort of creative string functions or regular expressions. [...]

Read Users' Comments (0)

LINQ Performance Improvements in .NET Framework Service Pack 1

There are three performance improvements in Service Pack 1. These improvements target LINQ to Objects and LINQ to SQL.

LINQ to Objects:

 

A new implementation of performing queries on Where and Select on List<T>, folds pipelines of multiple enumerable objects into single specialized enumerables. This
produces substantial improvement in base overhead of common LINQ to
Objects queries (at [...]

Read Users' Comments (0)

Visual Studio 2008 SP1 and .NET Framework 3.5 SP 1

Charlie Calvert has a good article about the just released service packs for Visual Studio and the .NET Framework: Released: Visual Studio Service Pack 1; .NET 3.5 Service Pack 1

Download

A download page is available here, or you can just follow these links:

VS 2008 Service Pack 1:

Executable: http://go.microsoft.com/fwlink/?LinkId=122094 (Direct Link)
Iso: http://go.microsoft.com/fwlink/?LinkId=122095 (Direct Link)

VS [...]

Read Users' Comments (0)

Standard Query Operators in LINQ

The standard query operators are the methods
that form the Language-Integrated Query (LINQ) pattern. Most of these
methods operate on sequences, where a sequence is an object whose type
implements the IEnumerable<(Of <(T>)>) interface or the IQueryable<(Of <(T>)>) interface.
The standard query operators provide query capabilities
including filtering, projection, aggregation, sorting and more.

List of Standard Query Operators in LINQ

Aggregation: Average, Count, LongCount, Max, Min, Sum
Concatenation : [...]

Read Users' Comments (1)

Links to LINQ Providers

I have put together a list of LINQ resources and third party providers. Even though most of these providers simply use or wrap LINQ to Objects, they can be helpful when working with a specific problem.

Official Microsft Providers

LINQ to SQL (DLINQ)
LINQ to XML (XLINQ)
LINQ to Entities

Anders Video
Blog

BLINQ

Video 1
Video 2

PLINQ

Third [...]

Read Users' Comments (0)

How to Write an XML File Using LINQ to XML

Many examples exist online for how to read an XML file using LINQ to XML. Unfortunately, there are not many articles describing how to write an XML file using LINQ to XML. In this article, I will demonstrate an easy way to quickly generate a well-formed and valid XML file using LINQ to XML.

The code [...]

Read Users' Comments (0)