Browse
class
DbContext
publicabstractnamespace Core.Data;
public abstract class DbContext : IDisposableA 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.