Anonymous methods, Lambdas, Confusion

I’ve been using Anonymous methods and Lambdas extressions for a little while now, but I do find as I go from customer to customer, do they really understand what all this means?

I can now safely say that Mike Taulty has posted a very good blog on the subject, which should assist in helping people to understand what it is all about.

Another useful link is from Devx From Delegate to Lambda

My Weather station

I’ve been playing with my Weather station, Watson W-8681, since Christmas Day, and I love it.

It came in a small box, all tidy and wanting to be built on Christmas day

Taking it all out of the box, you get the rain water measurer, wind direction, software CD, temp and wireless sensor and a cover to protect it, wind speed and all the fixing clamps needed.

The LCD display is very clear, and it is wireless, which means I can place it anywhere in the house and still know what is happening outside.  A single click anywhere on the LCD display lights up the panel for easy viewing.

Once the instruments are all assembled, it looks like a real weather station.

Software need to run the weather station, and pick up the data, which then stores all the data in EasyWeather.dat file

Easy Weather v4.ZIP (1.36 mb)

To enable upload to the Internet I used Cumulus software which take the EasyWeather.dat file and processes it, uploading html file via FTP and it also allow you to upload the data to Weather Underground, to allow others to see your results

CumulusSetup.exe (2.10 mb)

I have all my data being sent to the village web site 

All in all I am very pleased with the Weather Station.  The software is very retro and could do with being update, perhaps to WPF or Silverlight, but I don’t have the time at the moment to embark on a new project.

Creating an Entity Connection for the Entity Framework

When you start to play with the Entity Framework you will soon come up with the need to store your connection in a common place.  To do this you will need to with provide the connection string to the Entity Object Context or provide the Entity Connection.  I prefer to us the Entity Connection as you can explicity define each section of the connection.



and if you need to pass in the UserID and Password

For some more help on setting this up check out Ricka on Dynamic Data

StructureMap Example

After using StructureMap for a while I thought it would be nice to generate a simple example of how it all works, so I’ve built in Visual Studio 2008, both C# and a VB.NET version.

StructreMap (4.47 kb) (9.41 kb)

For more information on StructureMap please go to their main website

If you need to know more about IoC’s then it’s worth making a look at the following links:

Inversion of Control

List of .NET Dependency Injection Containers (IOC)

IoC Benchmarks

MVC Storefront: Dependency Injection


LINQ to Entity Framework

What with Entity Framework around, I have been finding it quite hard to find any good information about the Framework, so I have started to compile a list of good resources

The ADO.NET Entity Framework Overview

Code Samples

Mike Taulty is Mr Entity Framework

Professional ADO.NET 3.5 with LINQ and the Entity Framework

Entity Framework Toolkits & Extras

Transparent Lazy Loading for Entity Framework

Fastest way to find the number of records in MS SQL

Have you ever had a table to a lot of rows, when I mean a lot I mean over 1,000,000 records.

If you try and perform a row count like


it just takes forever.

If you are running SQL server you can perform a look up in the sysindexes table

FROM sysindexes
WHERE id = OBJECT_ID(‘table‘)
AND indid < 2

much fast, but not so easy.