Esempio n. 1
0
        private static IEventStore InitializeEventStore()
        {
            var typeResolver = new AttributeEventTypeResolver();

            typeResolver.AddAllEventsInAssembly(typeof(Program).Assembly);

            var eventStore = new MsSqlServerEventStore(ConfigurationManager.ConnectionStrings["EventStore"].ConnectionString, typeResolver, null);

            return(eventStore);
        }
Esempio n. 2
0
        private static IEventStore InitializeEventStore()
        {
            var typeResolver = new AttributeEventTypeResolver();

            typeResolver.AddAllEventsInAssembly(typeof(Program).Assembly);

            var converter = new EventConverter(typeResolver);

            converter.AddConverter(typeof(NameChangedEvent), new NameChangedEventPostConverter());
            converter.AddConverter(typeof(PersonCreatedEvent), new PersonCreatedEventPostConverter());

            var eventStore = new MsSqlServerEventStore(ConfigurationManager.ConnectionStrings["EventStore"].ConnectionString, typeResolver, converter);

            return(eventStore);
        }