Archive | LINQ RSS for this section

New connection providers in LINQPad

A few weeks ago I started testing the beta version of LINQPad 1.35. Some days ago it has been officially released. This great tool from Joe Albahari was introduced in 2007 and nowadays it has become a very mature tool which should be in the toolbox of every .NET developer.

Version 1.35 offers new connection providers and it has native support for LINQ to SQL and the Entity Framework models. It also provides new query types like SQL and Entity-SQL.

I am a fan of this tool and I already demonstrated its features in many of my articles. I was probably one of the first developers who used LINQPad to execute LINQ to Entities queries. In the past you needed to add some references and create the ObjectContext in each script. It was a bit of work but it functioned fine. Now you can do the same thing with the new connection providers but they also offer many advantages. In a small article which can found on my website I will highlight some of the new features.

Cleaning up and organizing Outlook mailboxes

At the beginning of the year I clean up and organise my Outlook mailboxes. I want to keep Outlook performing as fast as possible so I try to reduce the size of my inbox. Nowadays I use LINQPad, some C# scripts and my OutlookProvider component to simplify this job. I have no idea if these scripts are useful for other developers but why not share them? I have posted a small article on my website which contains these C# scripts.

Querying Excel worksheets with LINQ

A while ago I was looking for a way to query Excel with LINQ. I needed a simple solution that allows me to query tables in Excel worksheets in a tool like LINQPad.

I couldn’t find a solution which fitted my needs so I decided to write my own ExcelProvider.

Today I posted a small article that describes how I have implemented my ExcelProvider and it demonstrates its features by giving an example of a LINQ query and the result in LINQPad.

You can read the full article or download all sources at my website.

ADO.NET Entity Framework : Querying metadata

A few months ago I posted several articles about the ADO.NET Entity Framework beta 3. In the meanwhile the Entity Framework has been officially released and a lot of resources about this technology have become available.

The last few weeks I have been taking a closer look at the metadata services of the ADO.NET Entity Framework. It is not so easy to comprehend all the metadata concepts (EntityTypes, EntitySets, EdmTypes, EdmMembers, EdmProperties, NavigationProperties, …) of the three models in the Entity Framework. Besides it seems that there are almost no useful examples available on the internet.

That is why I have posted an article with 20 examples which use LINQ to query the metadata collections of the ADO.NET Entity Framework. These queries can be used to examine the structure of your Entity Data Model or to get statistics about it.

This is the table of contents of the article which is posted on my website:

LINQ AsHierarchy() improvements

A few months ago I published an article about my LINQ AsHierarchy extension method. This extension method can be used to convert a flat collection of records to a hierarchical structure of nested collections.

I got a lot of enthusiastic responses and questions and so I decided to improve this technique a little further. So I added a Parent reference in the HierarchyNode object and the AsHierarchy() method has been extended with RootID and MaxDepth parameters.

I also wrote a new article which describes these new features and demonstrates how to use the LINQ to Objects and the new LINQ to SQL AsHierarchy extension methods. Check it out at my personal website:

http://www.scip.be/index.php?Page=ArticlesNET23

Using the Google Maps HTTP geocoding service in .NET

Geocoding is the process of assigning geographical information to data, e.g. street addresses. I was looking for a way to get the latitude and longitude of a given address within a C# application. Therefore I did some research about the Google Maps API. This API is mainly a JavaScript client-side solution. Fortunately there is also a HTTP geocoding service.

After some experimenting I wrote an article which demonstrates how to use the Google Maps HTTP geocoding service and how to handle REST services and XML in general.

Read the whole article on my website www.scip.be