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 https://github.com/ziic/dcp-DDD-Foundation

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.

Overview

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: http://blogs.msdn.com/b/marblogging/archive/2011/05/23/domain-drive-design-n-layered-net-4-0-architecture-guide.aspx.

scheme1.PNG

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 http://en.wikipedia.org/wiki/Specification_pattern. 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 (https://entityframework.codeplex.com);
  • AdaptedRepositoryBase (not completed) base repository type that may be useful when your data model and domain model are different. It uses AutoMapper (http://automapper.org) to transparently map a domain entity to a data entity.

Installation

There are two ways to install.

Download a zip-archive with dll-files manually from https://dcpddd.codeplex.com/releases/

As NuGet packages:

How To use

How to use example

Documentation

You can download documentation here: https://dcpddd.codeplex.com/downloads/get/1437394.





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