-
Notifications
You must be signed in to change notification settings - Fork 6
Home
Welcome to the CoreDdd documentation! Currently it is a work in progress.
CoreDdd is a set of open-source .NET libraries helping with DDD and CQRS. The intention of CoreDdd libraries is to provide basic DDD and CQRS infrastructure, so a developer can concentrate on building the business features, and not on re-inventing the DDD/CQRS infrastructure code. Domain entity database persistence is currently supported only via NHibernate into a SQL database. CoreDdd supports .NET Core and full .NET framework. The library was tested on Windows and Linux with databases SQL Server, PostgreSQL and SQLite.
There are following CoreDdd libraries available on nuget:
https://www.nuget.org/packages/CoreDdd
https://www.nuget.org/packages/CoreDdd.Nhibernate
https://www.nuget.org/packages/CoreDdd.Nhibernate.Register.Castle
https://www.nuget.org/packages/CoreDdd.Nhibernate.Register.Ninject
https://www.nuget.org/packages/CoreDdd.Register.Castle
https://www.nuget.org/packages/CoreDdd.Register.Ninject
https://www.nuget.org/packages/CoreIoC
https://www.nuget.org/packages/CoreIoC.Castle
https://www.nuget.org/packages/CoreIoC.Ninject
https://www.nuget.org/packages/CoreUtils
To start using CoreDdd on your project, add CoreDdd package into your project, and create a domain entity derived from Entity
and implementing IAggregateRoot
interface, example:
public class Ship : Entity, IAggregateRoot
{
}
By deriving from Entity
class the domain entity gets Id
of type int
, and by implementing IAggregateRoot
interface the domain entity is marked as an aggregate root domain entity, which is available to be persisted and retrieved from a database using repository. Non-aggregate root entities (those derived from Entity
but not implementing IAggregateRoot
interface) is not possible to directly load from database via repository. Non-aggregate root entities belong to and are managed by an aggregate root domain entity.
Once an entity is persisted into a database, it can be queried.