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