ORM Sample Class Library

DataManager.GetCourseFromDataSet Method 

Gets a OleroTrainingBiz.Course from the already loaded records in this DataManager, by primary key.

[Visual Basic]
Public Function GetCourseFromDataSet( _
   ByVal ID As Integer _
) As Course
public Course GetCourseFromDataSet(
   int ID


Primary key of the data row to retrieve.

Return Value

A Course, or null if not found


This method is made available for when the dataset has been serialized from session state or disk.


This example shows a reason to use this method.

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

/* second web page - need to get currend contact */
DataManager dm = new DataManager(Config.Dsn);
dm.DataSet = (DataSet)Session["DataSet"];
_Course = dm.GetContactFromDataSet((System.Int32)Session["CourseID"]);

See Also

DataManager Class | OleroTrainingBiz Namespace

div>od.gif">ICustomTypeDescriptor.GetClassName (inherited from BusinessBase)GetClassName