The focus of this release was to remove magic, primarily by removing the dependency on Winton.DomainModelling.Abstractions
.
Most of the classes were also renamed from XFacade
to XRepository
to better reflect their nature.
In particular the following were renamed:
IEntityFacade
->IEntityRepository
IEntityFacadeFactory
->IEntityRepositoryFactory
IValueObjectFacade
->IValueRepository
IValueObjectFacadeFactory
->IValueRepositoryFactory
Repositories will no longer do ID generation for entities. In the previous versions this had the undesirable side-effect of meaning that all entities had to have a serialisable ID, which leaked persistence concerns into the applications domain. It also introduced coupling between domain and persistence layers by the fact that domain model relied on storage infrastructure to generate IDs, which does not meet the requirements of true persistence ignorance. Clients that previously relied on this behaviour should use Guid.NewGuid()
when entities are first created to ensure they have an ID set.
On the same topic of serialisation, this library no longer performs mapping of entities to DTOs. This can be just as easily done by the client application and provides more flexibilty, whilst also simplifying the interfaces in this repository.
Finally, an extension method for IServiceCollection
called AddDomainModellingDocumentDb
was added and the implementations of all interfaces were made internal
. Clients must now call the extension method and use DI. This hides implementation details and simplifies setup for clients who previously had to know how to wire up these concretions.
See the README for full usage details of this release.