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


Name Type Description
TableLinkStore(DbModel dbModel) void


Name Type Description
Model DbModel Current DbModel


Name Type Description
AddLink(string table1Name, string table2Name, string field1, string field2, TableLinkType linkType = 0) TableLink Adds new link
AddRange(IEnumerable<TableLink> links) void Adds links
ClearItems() void Clears the items.
InsertItem(int index, TableLink item) void Inserts an element into the System.Collections.ObjectModel.Collection'1 at the specified index.
ReadFromJsonAsync(JsonReader reader) Task Reads the list of links from JSON (asynchronous way).
RemoveByTable(Table table) void Removes all links which contain the table passed in parameter
RemoveItem(int index) void Removes the element at the specified index of the System.Collections.ObjectModel.Collection'1.
UpdateLink(string tableName1, string tableName2, TableLinkType linkType) bool Finds link by table aliases and updates its type
WriteToJsonAsync(JsonWriter writer) Task Writes the list of linksto JSON.