public DomainFactory(IDependencyContainer container) { container.GuardAgainstNull(nameof(container)); this.container = container; this.aggregateRootFactories = new Dictionary <Type, AggregateRootFactory <IPersistableAggregateRoot> >(); this.entityFactories = new Dictionary <Type, EntityFactory <IPersistableEntity> >(); this.valueObjectFactories = new Dictionary <Type, ValueObjectFactory <IPersistableValueObject> >(); }