Project Description
Base super types for repository, specification, unit of work, query commands and other of Domain and Infrastructure Data layers of Domain Driven Design approach

Migrated to GitHub

The project includes some useful base classes to build a "Domain" layer and an "Infrasructure Data" layer when you use Domain Driven Design approach. In terms of DDD these classes named as Super Types.

Infrastructure Data layer supports Entity Framework.


DDD approach assumes that you separate your types into several layers: UI, Application, Domain, Infrastructure for data persistence and other. You can learn more details using the following link:


The project consists of two libraries (dcp.DDD.DomainModel.SuperTypes.dll, dcp.DDD.Infrastructure.Data.EF.SuperTypes.dll) and, as you can see in figure 1, covers two main blocks:
  • Bases (SuperTypes) of Domain Model Layer;
  • Bases (Layer SuperTypes) of Infrastructure Layer for Data Persistence. This block relies on Entity Framework.

It provides base types (classes) and contracts (interfaces) as a start points to create your own repositories, specification, units of work.
Domain Model Layer block contains:
  • IRepository contract that covers necessary general methods of a repository pattern, such as Find, Add, Delete and other useful query methods (see details in Documentation SOON). Sometimesa consumer of the repository (developer) should know that he works with the database on a lower layer, and he should do more optimized queries: select only necessary information and pre-load related entites. To do optimized queries you can use methods that specify a projection that will contain only necessary data, and specify relations that should be eager loaded for the best performace;
  • IUnitOfWork contract that covers "unit of work" pattern;
  • Specification base types. Learn more on Repository can query entities satisfied by specification.
Infrastructure Layer for Data Persistence block contains:
  • Abstract RepositoryBase base type that implements all necessary general things, and relied on EntityFramework (;
  • AdaptedRepositoryBase (not completed) base repository type that may be useful when your data model and domain model are different. It uses AutoMapper ( to transparently map a domain entity to a data entity.


There are two ways to install.

Download a zip-archive with dll-files manually from

As NuGet packages:

How To use

How to use example


You can download documentation here:

Last edited Sep 18 at 1:40 PM by ziic, version 17