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(); } }
public Task WhenILoadTheSession() => entityFrameworkRepositoryContainer.StartSession(clientIdContainer.Id);