LINQ provides a Distinct() method, but in order to find distinct elements in a list of some target class, we must first implement the IEqualityComparer<T> interface in our target class. That’s what Distinct() uses in order to compute whether one element is the same as another element. Implementing IEqualityComparer<T>, however, is not so straightforward as… Read More


I just released a new version of open source Texticize. Texticize is an extensible and intuitive object-to-text template engine for .NET. You can use Texticize to quickly create dynamic e-mails, letters, source code, or any other structured/unstructured text documents using predefined text templates substituting placeholders with properties of CLR objects at run-time. Check it out… Read More


AutoMapper is an awesome open source library that allows automatic object-to-object mapping.  There are various getting-started blog posts and articles on the web that will get you started with AutoMapper.  I was recently challenged with a particular situation using AutoMapper that wasn’t immediately clear and took me a little investigating and some trial and error work. My… Read More


ADO.NET Entity Framework means many things to many people.  At it’s core, however, it allows for Object Relational Mapping (ORM) by providing a layer of abstraction between relational databases and Object Oriented domain objects. The first version of Entity Framework was introduced with .NET Framework 3.5 SP1 and Visual Studio 2008 SP1.  While the intention… Read More