DataSmith 0.1.2
Loading...
Searching...
No Matches
Baruah.DataSmith.SQLGameModel< T > Class Template Referenceabstract
Inheritance diagram for Baruah.DataSmith.SQLGameModel< T >:
Baruah.DataSmith.GameModel Baruah.DataSmith.IGameModel Baruah.DataSmith.Sample.InventoryItemModel

Public Member Functions

void CreateTable ()
 Creates the database table if it does not exist.
void Insert (T item)
void Update (T item)
IEnumerable< T > GetAll ()
override string Serialize ()
 Produces a serialized representation of this SQL-backed game model.
override void Deserialize (string data)
 Ignores the provided serialized data and performs no action.
Public Member Functions inherited from Baruah.DataSmith.GameModel
string Serialize ()
void Deserialize (string data)

Additional Inherited Members

Protected Member Functions inherited from Baruah.DataSmith.GameModel
virtual void OnDeserialized ()

Member Function Documentation

◆ CreateTable()

void Baruah.DataSmith.SQLGameModel< T >.CreateTable ( )
abstract

Creates the database table if it does not exist.

◆ Deserialize()

override void Baruah.DataSmith.SQLGameModel< T >.Deserialize ( string data)

Ignores the provided serialized data and performs no action.

Parameters
dataSerialized data to deserialize (ignored).

◆ GetAll()

IEnumerable< T > Baruah.DataSmith.SQLGameModel< T >.GetAll ( )
abstract

Retrieves all records of type T from the model's data store.

Returns
An IEnumerable<T> containing every record of type T in the model's data store.

◆ Insert()

void Baruah.DataSmith.SQLGameModel< T >.Insert ( T item)
abstract

Inserts the provided entity as a new record in the underlying data store.

Parameters
itemThe entity to insert.

◆ Serialize()

override string Baruah.DataSmith.SQLGameModel< T >.Serialize ( )

Produces a serialized representation of this SQL-backed game model.

Returns
An empty string.

◆ Update()

void Baruah.DataSmith.SQLGameModel< T >.Update ( T item)
abstract

Updates the database record that corresponds to the provided item.

Parameters
itemThe entity containing the updated values; its identifier is used to locate the existing record.

The documentation for this class was generated from the following file: