Skip to main content

tablelinkstore-class

Represents a storage of links connected with some DbModel object

public class Korzh.EasyQuery.Db.TableLinkStore
: TableLinkList

Assembly: Korzh.EasyQuery.Db.dll

Constructors

NameTypeDescription
TableLinkStore(DbModel dbModel)void

Properties

NameTypeDescription
ModelDbModelCurrent DbModel

Methods

NameTypeDescription
AddLink(string table1AliasOrName, string table2AliasOrName, string field1, string field2, TableLinkType linkType = 0)TableLinkAdds new link
AddLink(DbTable table1, DbTable table2, string field1, string field2, TableLinkType linkType = 0)TableLinkAdds new link
AddRange(IEnumerable<TableLink> links)voidAdds links
ClearItems()voidClears the items.
InsertItem(int index, TableLink item)voidInserts an element into the System.Collections.ObjectModel.Collection'1 at the specified index.
ReadFromJsonAsync(JsonReader reader, CancellationToken ct = null)TaskReads the list of links from JSON (asynchronous way).
RemoveByTable(Table table)voidRemoves all links which contain the table passed in parameter
RemoveItem(int index)voidRemoves the element at the specified index of the System.Collections.ObjectModel.Collection'1.
UpdateLink(string tableName1, string tableName2, TableLinkType linkType)boolFinds link by table aliases and updates its type
WriteToJsonAsync(JsonWriter writer, CancellationToken ct = null)TaskWrites the list of linksto JSON.