Beispiel #1
0
 /// <inheritdoc cref="IScopeContextCreator{T}"/>
 public IDisposable CreateReadScope(Func <T> contextBuilder)
 {
     CurrentContexts = CurrentContexts.Push(contextBuilder.Invoke());
     return(new PopWhenDisposed());
 }
Beispiel #2
0
 /// <inheritdoc cref="IContextLocator{T}"/>
 public T GetCurrentDbContext() => CurrentContexts.Peek();