ORM Sample Class Library

DataManager.GetContactCollectionFromDataSet Method 

Gets a collection of Contact from the already loaded records in this DataManager instance.

[Visual Basic]
Public Function GetContactCollectionFromDataSet() As ContactCollection
[C#]
public ContactCollection GetContactCollectionFromDataSet();

Return Value

A collection of Contact objects.

Remarks

This method is made available for when the dataset has been serialized from session state or disk. This method will return all Contact loaded.

Example

This example shows a reason to use this method.

/* first web page - save dataset and primary keys */
Session["DataSet"] = dm.DataSet;
Session["ContactID"] = _Contact.ID;

/* second web page - need to get current contact */
DataManager dm = new DataManager(Config.Dsn);
dm.DataSet = (DataSet)Session["DataSet"];
_Contact = dm.GetContactFromDataSet((int)Session["ContactID"]);

See Also

DataManager Class | OleroTrainingBiz Namespace


="50%">GetAttributes