Class RedbScope

Namespace: redb.Core
Assembly: redb.Core.dll

A scope opened from a service () and the service of the same database
inside it. The holder owns the scope: disposing it ends the service and returns its connection.

public sealed class RedbScope : IDisposable, IAsyncDisposable

Inheritance

Object→RedbScope

Implements

Properties

Service

The service inside the scope.

public IRedbService Service { get; }

ServiceProvider

The scope's provider, for other scoped services of the same unit of work; null without a scope.

public IServiceProvider? ServiceProvider { get; }

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

DisposeAsync()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources asynchronously.

public ValueTask DisposeAsync()

Constructors

RedbScope(IRedbService, IServiceScope?)

Wraps service with the scope that owns it. A null scope is for a service owned elsewhere