Garry Pilkington
<br/>Application Developer<br/>Liverpool, UK
-
Unit Testing Videos
The Learn Visual Studio.net website has just published a new series on unit testing, covering an introduction to unit testing, using MSTest, and NUnit. These are always good sources of practical information to help you get up to speed on anything .net. Go check them out.
-
TempData and DropDownList in ASP.Net MVC
TempData
Sometimes while developing web applications, you have a need to keep certain data between web requests. In asp.Net MVC you can use TempData which will keep hold of any values you pass to it for that request and the next request when it is then removed. This is a great way of keeping form elements at a particular state during form submission from an mvc view. In the following example I will briefly explain how to render a drop down list populated with data which will keep the selected value across form submission. -
Code Snippet Plugin for Live Writer
For anybody who regularly displays code using Live Writer, then this plugin by Leo Vildosola is a must to check out. When ever I do a rebuild of any of my computers this has to go on and I always have trouble remembering where I found it.
-
LINQ Projection
just recently I have been doing quite a bit of work with LINQ and L2S in particular. Although LINQ is nothing new now and I am sure the vast majority of readers out there have had some form of introduction to LINQ. However one of the great things that I still find fascinating is a technique called projection. This is a way to shape data coming back from a query into something more akin to what you want.
-
Complex Types in the Entity Framework
In this post I will describe the process you need to go through to get a stored procedure to return a complex type in the Entity Framework.
-
LINQ to XML Quick Brain Dump
LINQ to XML is a simple toolset that allows developers to easily interact with XML, whether it be in file form of on the wire in string form.
-
Do you test your private methods?
There is ample discussion on the blogosphere as to why you should or shouldn't test your private methods.
-
Why I prefer c# over VB
A couple of weeks back I was asked by a friend of a friend why I code in c# over VB. I didn’t give him a very good answer at the time as I just couldn’t pinpoint the reason. Since then I have had a real good think about it and have come to this conclusion. It just looks bulky. Not a good reason I know. I am not what you would consider a power developer, I use .net for relatively simple tasks and there isn’t any feature I would consider using one language over the other. So for me it just comes down to aesthetics. I can and have programmed in both classic VB and VB.Net and it was only about 4 years ago that I decided to have a look at c#. Now when I look at old code I have written in VB.Net I not only shudder at the overall crapness of my code, but also the amount of non-whitespace. A simple while loop in VB looks less clean than its cousin in c#.
-
Quickly reading technical articles and books
-
Open containing folder
This is one VS 2008 shortcut I use all the time. Open the folder which contains the file you are currently working on.