Interface IPersistedCollection<TItem>

The interface for collections of items with Name and ID (as GUID) properties that can be persisted to a table in a database.


public abstract interface IPersistedCollection<TItem>

Interface Members

MemberDescription

CanRemoveItem

Determines if the item can be removed from the collection and the table.

public bool CanRemoveItem(TItem item);

CanSaveItem

Determines if the specified item can be saved.

public bool CanSaveItem(TItem item);

CreateTable

Creates the table if it doesn't exist using the specified open connection.

public void CreateTable(IDbConnection conn);

public void CreateTable();

DeleteItem

Removes the specified item from the table and the collection.

public bool DeleteItem(string ID);

public bool DeleteItem(TItem item);

LoadCollection

Loads the collection from the table.

public void LoadCollection();

public void LoadCollection(IDbConnection conn);

public void LoadCollection(IDbConnection conn,
    bool checkForDuplicates);

SaveItem

Saves the specified item to the table.

public bool SaveItem(TItem item);

public void SaveItem(TItem item,
    IDbConnection conn)

Provider

The provider that connects to the database.

Requirements

Namespace: Stonefield.Collections
Assembly: collections.dll