예제 #1
0
        public async Task WhenITryToUpdateAnExistingEntityWithTheNewEventsInTheStream()
        {
            using (var session = await repositoryContainer.StartSession(clientIdContainer.Id))
            {
                session.AddEvents(eventsContainer.LastEventsCreated);

                //The implementation is sync-based. Async it stubbed.
                recordedException = await Record.ExceptionAsync(() => session.SaveChanges());
            }
        }
예제 #2
0
 public async Task WhenILoadMyEntity()
 {
     using (var session = await repoContainer.StartSession(clientIdContainer.Id))
     {
         lastStateContainer.LatestLoadedState = session.GetCurrentState();
     }
 }
예제 #3
0
 public Task WhenILoadTheSession()
 => entityFrameworkRepositoryContainer.StartSession(clientIdContainer.Id);