Locks the database.
public Task<TContext> LockAsync(CancellationToken cancellationToken)
Database tables and records should only be accessed while the database is locked. Dispose the returned context to unlock the database.