IEventStore instance should have a lifecycle of singleton with respect to your application. That is, it should be initialized once.
Should IEventStore Instance be Static?
-
27-09-2022 - |
Pergunta
Just getting started with NEventStore.
Should I be calling Init()
every time I want to connect (like a database connection), or should I create a static
(or singleton
) instance of IEventStore
and just initialize once?
I'm aware of the example here, which creates a static instance (but also doesn't use the store outside of the MainProgram class).
Solução
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow