Tired of looking for errors in log files? Use OneTrueError - Automatic exception management for .NET.

Monthly Archives: June 2012

Griffin.Container: Introducing the command support.

Commands are a great way to decouple logic in an application, since the command invoker have no knowledge of where the command is handled. You also move the focus from the how the task is solved to the task itself. … Continue reading

Posted in Architecture, CodeProject | Tagged , | Leave a comment

ASP.NET MVC3: Custom error for 401 Unauthorized

Have you tried to display a custom error message if authorization fails.. .. by specifying it in the customErrors section in web.config: So did I without getting it to work. The [HandleError] attribute can not handle it either since it … Continue reading

Posted in Uncategorized | Tagged | Leave a comment

Double check pattern

I just answered a question at SO about lazy loading which involved the double check pattern. It’s a really useful pattern for lazy loading since it hurt performance a lot less than always locking. I thought that I should share … Continue reading

Posted in Architecture, CodeProject | Tagged , | 1 Comment

Adding a required indicator in ASP.NET MVC3 using jQuery

You might want to indicate that fields in ASP.NET MVC3 is required visually. It’s easy thanks to the HTML attributes that the unobtrusive validation API generates. Start by adding a new CSS class in your site.css called something like .required-indicator. … Continue reading

Posted in Uncategorized | Tagged , | 2 Comments

How to handle transactions in ASP.NET MVC3

I got annoyed about having to repeat the transaction handling in every POST method of my controllers. First of all: I don’t want to have to take the unit of work in the constructor of each controller, since that implicitly … Continue reading

Posted in CodeProject | Tagged , | 9 Comments

Protect your data!

The introduction of OR/M libraries and strongly typed views/view models has made a lot of programmers to switch to the dark side. Let’s fight this evil! What evil am I talking about? Public setters in your domain/business model (or whatever … Continue reading

Posted in Architecture | Tagged | 29 Comments