Thread-Safe, Strongly-Typed Memory Caching in C#

Quick and simple. This extension adds a strongly-typed version of AddOrGetExisting that utilizes Lazy<T> to ensure thread-safety. public static class ObjectCacheExtensions { public static T AddOrGetExisting<T »

A Truly Generic Repository, Part 2

This is part of a series on using generics in C# to make code more resuable. Other articles in this series: Generic Entity Base Class A Truly Generic Repository, Part »

A Truly Generic Repository, Part 1

This is part of a series on using generics in C# to make code more resuable. Other articles in this series: Generic Entity Base Class A Truly Generic Repository, Part »

Generic Entity Base Class

This is part of a series on using generics in C# to make code more resuable. Other articles in this series: Generic Entity Base Class (this article) A Truly Generic »

UrlHelper Extension to Modify Query String

The following extension method allows you to add, update, or remove parameters from a URL's query string. public static class UrlHelperExtensions { /// <summary> /// Add, update, or remove parameters from »

System.NullReferenceException: Object reference not set to an instance of an object

For some reason, this particular error seems to just confuse the stuffing out of ASP.NET MVC developers in particular. Granted, it's not one of the most obvious or informative »