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
TModel 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
newRecordsList<T>New records to be added
Add(T)
Adds a new record to the table.
void Add(T newRecord)
Parameters
newRecordTNew record to be added
Delete(List<T>)
Deletes records.
void Delete(List<T> records)
Parameters
recordsList<T>Records to be deleted
Delete(T)
Deletes a record.
void Delete(T record)
Parameters
recordTRecord to delete
LoadAsync(List<object>, CancellationToken)
Asynchronously loads data using a key-value pair filter.
Task LoadAsync(List<object> keyValues, CancellationToken cancellationToken = default)
Parameters
keyValuesList<object>cancellationTokenCancellationToken
Returns
LoadAsync(IDbCommand, bool, CancellationToken)
Asynchronously loads table data by executing a db command.
Task LoadAsync(IDbCommand dbCommand, bool clearExistingData = true, CancellationToken cancellationToken = default)
Parameters
dbCommandIDbCommandclearExistingDataboolcancellationTokenCancellationToken
Returns
LoadAsync(string, bool, CancellationToken)
Asynchronously loads table data by executing a SQL command.
Task LoadAsync(string SQL, bool clearExistingData = true, CancellationToken cancellationToken = default)
Parameters
SQLstringclearExistingDataboolcancellationTokenCancellationToken
Returns
LoadAsync(CancellationToken)
Asynchronously loads data from the database into the table.
Task LoadAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
SaveAsync(CancellationToken)
Asynchronously saves all pending changes (adds, updates, deletes) to the database.
Task SaveAsync(CancellationToken cancellationToken = default)
Parameters
cancellationTokenCancellationToken
Returns
Update(List<T>)
Updates existing records.
void Update(List<T> records)
Parameters
recordsList<T>Records to be updated
Update(T)
Updates an existing record.
void Update(T record)
Parameters
recordTRecord 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
OnBeforeModify
Occurs before a table modifies a record. It is fired on any Add,Update,Delete
event EventHandler<IModifyRecordEventArguments<T>> OnBeforeModify