By AlanM on
2012-01-07T20:58:44
A snippet I use frequently.
|
By AlanM on
2012-01-05T11:30:11
I'm a believer in creating unit tests for systems, to a point. For example, most of my systems have a data access layer, and a model (aka "domain" or "business") layer, which often follows the Repository pattern. (I'm not sure I see the value of always separating the Repository from the model, but that's another blog post.)
Lately, my data access layers use ADO.NET Entity Frameworks. I feel that there is very little point to writing unit tests for EF libraries. However, I need to test my Repository layer, without complicating my data access layer by trying to force EF to cooperate with some dependency injection framework (typically Unity).
To this end, I've been pleased to discover and use NDbUnit. This package can be fetched using NuGet.
This is how NDbUnit works,...
|
By AlanM on
2011-11-29T20:26:16
I discovered that I got unintentional double data-binding by leaving the AutoDataBind property of the WebFormsMvp.MvpUserControl set to True. I explain why I think this happened, and how to fix it.
|
By AlanM on
2011-10-26T14:55:14
As given to the Sacramento .NET Users Group meeting on Oct 28, 2011
|
By AlanM on
2011-10-12T15:31:26
This is crazy! I'm trying to uninstall Microsoft Expression Studio 3 from my VMWare. It's been running for nearly three hours! Most of that time it has been in the Kernel. What's up with this? I don't remember it taking this long to install in the first place… :-(

|
By AlanM on
2011-10-09T00:07:46
I can’t recommend volunteering enough. It was just a small amount of extra work, but the payoff was the best. There was a shorter registration line for volunteers. But the dinner this evening was what tipped the balance. I’ll get to that. Coffee: there was plenty of it, but they seemed to have a sweetener shortage. A couple of sugar packets were procured, through means I wish not to know. Big lines in front of the vendors tents with the coolest stuff and bigger giveaways. Unsurprising and unavoidable. One must collect ALL THE THINGS. First session of the day for me: How to Break Into Mobile App Development. Delivered quite well, this talk would have been better titled How to Break Into a Mobile App Development Job. The course description made that clear. Why did I take this instead of The Best HTML5 Tools You're Not Using? I don’t...
|
By AlanM on
2011-09-24T15:45:59
|
By AlanM on
2011-09-24T15:31:00
I have updated some snippets that I use quite a lot when I want to add an event to a class. You can download the VSI file from CodeCharm.com.
|
By AlanM on
2011-07-05T20:01:29
I tend to be a little lazy. Hey, I’m a programmer! I will work very hard to make sure that I don’t have to do anything automatable more than once. Anyway, I rely on the compiler to tell me when I’m doing something that isn’t allowed. My compiler let me down. And I suffered through a couple of hours of a very weird problem. I had been trying out a new model for user interfaces on the Windows Phone 7, and part of that model relies on some interfaces using generics. I’m a big fan of generics – they help me avoid boxing/unboxing, keep strongly-typed collections and so on. The model is multi-platform; it’s the basis for programs that I intend to deploy on Windows, Windows Presentation Framework, Web, Silverlight, and Windows Phone 7 platforms. And… I use ReSharper a lot. It’s a fantastic tool, and I wish I’d been using it a long time ago. So when ReSharper suggested that I refactor...
|
By AlanM on
2011-06-24T17:35:25
Looks like I had my VS not completely connected to the TFS server. Poking around at the Credential Manager, the TFS Administration Console, and the VS Team Explorer connections seems to have cleared it all up. I was able to successfully get Moq installed using NuGet into my test project.
|