Table of Contents

Interface IOrpheusTable<T>

Namespace
OrpheusInterfaces.Core
Assembly
OrpheusInterfaces.dll

Orpheus table is the core component of an Orpheus module. Every module needs to have at least 1 table. Holds all the data of the connected table.

public interface IOrpheusTable<T> : IOrpheusTable, IDisposable

Type Parameters

T

Model type

Inherited Members

Properties

Data

Table's data.

List<T> Data { get; }

Property Value

List<T>

Table's data

Methods

Add(List<T>)

Adds a list of new records.

void Add(List<T> newRecords)

Parameters

newRecords List<T>

New records to be added

Add(T)

Adds a new record to the table.

void Add(T newRecord)

Parameters

newRecord T

New record to be added

Delete(List<T>)

Deletes records.

void Delete(List<T> records)

Parameters

records List<T>

Records to be deleted

Delete(T)

Deletes a record.

void Delete(T record)

Parameters

record T

Record to delete

LoadAsync(List<object>, CancellationToken)

Asynchronously loads data using a key-value pair filter.

Task LoadAsync(List<object> keyValues, CancellationToken cancellationToken = default)

Parameters

keyValues List<object>
cancellationToken CancellationToken

Returns

Task

LoadAsync(IDbCommand, bool, CancellationToken)

Asynchronously loads table data by executing a db command.

Task LoadAsync(IDbCommand dbCommand, bool clearExistingData = true, CancellationToken cancellationToken = default)

Parameters

dbCommand IDbCommand
clearExistingData bool
cancellationToken CancellationToken

Returns

Task

LoadAsync(string, bool, CancellationToken)

Asynchronously loads table data by executing a SQL command.

Task LoadAsync(string SQL, bool clearExistingData = true, CancellationToken cancellationToken = default)

Parameters

SQL string
clearExistingData bool
cancellationToken CancellationToken

Returns

Task

LoadAsync(CancellationToken)

Asynchronously loads data from the database into the table.

Task LoadAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task

SaveAsync(CancellationToken)

Asynchronously saves all pending changes (adds, updates, deletes) to the database.

Task SaveAsync(CancellationToken cancellationToken = default)

Parameters

cancellationToken CancellationToken

Returns

Task

Update(List<T>)

Updates existing records.

void Update(List<T> records)

Parameters

records List<T>

Records to be updated

Update(T)

Updates an existing record.

void Update(T record)

Parameters

record T

Record to be updated

Events

OnAfterModify

Occurs after a table modifies a record. It is fired on any Add,Update,Delete

event EventHandler<IModifyRecordEventArguments<T>> OnAfterModify

Event Type

EventHandler<IModifyRecordEventArguments<T>>

OnBeforeModify

Occurs before a table modifies a record. It is fired on any Add,Update,Delete

event EventHandler<IModifyRecordEventArguments<T>> OnBeforeModify

Event Type

EventHandler<IModifyRecordEventArguments<T>>