Skip to content

IDocumentStorage

zehavibarak edited this page Feb 15, 2025 · 3 revisions

Database Objects

Table Usage
Documents Document header and data model
Recipients Document's recipients
Events Document's Events
Locations Document's geo data
Attachments Document's attachments (Using BizDocService.UseDatabaseFileStore)
Comments Comments of documents
Entries Cube Axes mapping for a document
Log Document log. May be one of ActionTaken, Submit, Escalate, ModelChange, Download, Vote, CheckOut, CheckIn, StateChange or Move. Log models can be found in BizDoc.Core.Data.Models.Log namespace.
Cube Reflects document Entries and data from 3rd party app
Indices Indices for cube
Segments Account segments code names (default implementation)
Combinations Account segments combinations (default implementation)
Chats Conversations (when applicable)

Programming

To manipulate documents and document -related data such as recipients and attachments use IDocumentFactory. To access cube use IAnalysisService.

The Entries and Cube can be reevaluated by triggering IDocumentFactory.SynchronizeMappingAsync() from /recurringjobs.

Access database context as DI service.

using BizDoc.Core.Data;
public class MyClass {
    private readonly IDocumentStorage _store;
    public MyClass(IDocumentStorage store) {
        _store = store;
    }
    private void MyMethod() {
        var docs = _store.Documents.Where(d=> d.Issued >= DateTime.UtcNow.AddMonth(-1));
        ...
    }
}

Low-Level Access

ExecuteReaderAsync<T>(), ExecuteScalarAsync<T>() and ExecuteAsync.

Release Notes

Angular npm, Flutter pub.dev and Nuget packages.

Clone this wiki locally