Browse
Sample.LibCore.DataDbContext
.md
class

DbContext

publicabstract
namespace Core.Data; public abstract class DbContext : IDisposable

A minimal unit of work that tracks entity changes.

Constructors

#protected DbContext()

Initializes a new instance of the object class.

Methods

#public abstract Task<int> SaveChangesAsync( CancellationToken cancellationToken = default )

Persists all tracked changes to the store.

cancellationTokenโ€”A token to observe for cancellation requests.

returnsโ€”The number of state entries written to the store.

throwsโ€” InvalidOperationException: Thrown when the context was disposed.

#public virtual void Dispose()

Releases the context.