Should an instance of IEventStore be static?

Just get started with NEventStore .

Do I have to call Init()every time I want to connect (for example, a database connection), or do I need to create an instance static(or singleton) IEventStoreand just initialize once?

I know an example here that creates a static instance (but also does not use storage outside of the MainProgram class).

+4
source share
1 answer

The IEventStore instance must have a singleton life cycle relative to your application. That is, it must be initialized once.

+5

All Articles