CQRS.Tests.CQRS.EventSourcing.Sql.SqlServerEventStoreSessionTests.CreateStore C# (CSharp) Метод

CreateStore() защищенный Метод

protected CreateStore ( ) : IEventStore
Результат IEventStore
        protected override IEventStore CreateStore()
        {
            return new SqlServerEventStore(ConnectionString, new SingleThreadUseGuard());
        }

Usage Example

        public void InsertNewEventType_should_not_throw_exception_if_the_event_type_has_been_inserted_by_something_else()
        {
            Action changeAnotherUsersEmailInOtherAppDomain = () =>
            {
                AppDomainExtensions.ExecuteInCloneDomainScope(
                    () =>
                {
                    var test = new SqlServerEventStoreSessionTests();
                    test.Setup();
                    using (var session = test.OpenSession(test.CreateStore()))
                    {
                        var otherUser = User.Register(session, "*****@*****.**", "password", Guid.NewGuid());
                        otherUser.ChangeEmail("*****@*****.**");
                        session.SaveChanges();
                    }
                });
            };

            using (var session = OpenSession(CreateStore()))
            {
                var user = User.Register(session, "*****@*****.**", "password", Guid.NewGuid());
                session.SaveChanges();

                changeAnotherUsersEmailInOtherAppDomain();

                user.ChangeEmail("*****@*****.**");
                session.SaveChanges();
            }
        }
All Usage Examples Of CQRS.Tests.CQRS.EventSourcing.Sql.SqlServerEventStoreSessionTests::CreateStore