DbPersistableHelper

Ecng.Serialization

Extension methods for database persistence operations.

メソッド

LoadFkAsync``1
public static ValueTask<T> LoadFkAsync<T>(SettingsStorage storage, string name, IStorage db, CancellationToken ct)
result = DbPersistableHelper.LoadFkAsync(storage, name, db, ct)

Asynchronously loads a foreign key entity from the database.

LoadFkAsync``2
public static ValueTask<T> LoadFkAsync<TId, T>(SettingsStorage storage, string name, IStorage db, CancellationToken ct)
result = DbPersistableHelper.LoadFkAsync(storage, name, db, ct)

Asynchronously loads a foreign key entity from the database (generic version for non-long identity types).

SetFk
public static SettingsStorage SetFk(SettingsStorage storage, string name, long? id)
result = DbPersistableHelper.SetFk(storage, name, id)

Sets a foreign key value in the settings storage.

SetFk``1
public static SettingsStorage SetFk<TId>(SettingsStorage storage, string name, TId? id)
result = DbPersistableHelper.SetFk(storage, name, id)

Sets a foreign key value in the settings storage (generic version for non-long identity types).

ToItems
public static SerializationItemCollection ToItems(SettingsStorage storage, IReadOnlyList<SchemaColumn> columns)
result = DbPersistableHelper.ToItems(storage, columns)

Converts a settings storage to a serialization item collection using the specified schema columns.

ToStorage
public static SettingsStorage ToStorage(SerializationItemCollection items)
result = DbPersistableHelper.ToStorage(items)

Converts a serialization item collection to a settings storage.