I have an object called SecurityServer
.
It is created using SecurityServerFactory
.
I need to serialize SecurityServer
to disk/hardware token/ or some other storage.
Which is more correct:
securityServerInstance.Save()
StorageAbstract.SaveServer(securityServerInstance);
- Both?
- Neither? Use injection?
I have a feeling I need to understand domain driven design, but I'm self taught at this point and am starting to finally "get it"
Aggregates
are persisted byRepositories
at the request of an Application service in a transaction