Exemplo n.º 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());
            }
        }
Exemplo n.º 2
0
 public async Task WhenILoadMyEntity()
 {
     using (var session = await repoContainer.StartSession(clientIdContainer.Id))
     {
         lastStateContainer.LatestLoadedState = session.GetCurrentState();
     }
 }
Exemplo n.º 3
0
 public Task WhenILoadTheSession()
 => entityFrameworkRepositoryContainer.StartSession(clientIdContainer.Id);