The purpose of this article is to describe the technique I
have used to implement the repository pattern in .NET applications. I will
provide a brief description of the repository pattern and LINQ-to-SQL. However,
if you are unfamiliar with these technologies, you should research them
elsewhere. The goals of my implementation are:
• It must be a general purpose design that can be reused for
• It must facilitate domain driven design.
• It must facilitate unit testing and testing in general.
• It must allow the domain model to avoid dependencies on
• It must provide strongly typed querying.