Skip to content

TableLinkStore class

Represents a storage of links connected with some DbModel object

public class Korzh.EasyQuery.Db.TableLinkStore
: TableLinkList

Package: Korzh.EasyQuery.Db (targets: netstandard2.0)

Assembly: Korzh.EasyQuery.Db.dll

NameTypeDescription
TableLinkStore(DbModel dbModel)void
NameTypeDescription
ModelDbModelCurrent DbModel
NameTypeDescription
AddLink(string table1Name, string table2Name, 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)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)TaskWrites the list of linksto JSON.