Locks the database.
public TContext Lock()
Database tables and records should only be accessed while the database is locked. Dispose the returned context to unlock the database.