ORM Sample Class Library

DataManager Class

Main entry point into the database. 'Get' calls fetch data using the QueryCriteria object. 'New' calls create new objects/rows. The CommitAll() function will need to be called at the end.

For a list of all members of this type, see DataManager Members.

System.Object
   DataManagerBase
      DataManager

[Visual Basic]
Public Class DataManager
Inherits DataManagerBase
[C#]
public class DataManager : DataManagerBase

Thread Safety

Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.

Example

Example of retrieving a contact and some of it's child rows from the database.

DataManager dm = new DataManager(Config.Dsn);
dm.QueryCriteria.And(JoinPath.Contact.Teacher.Schedule.Columns.Duration,30,MatchType.GreaterOrEqual);
Contact c = dm.GetContact(FetchPath.Contact.Teacher.All);
Example of an insert
DataManager dm = new DataManager(Config.Dsn);
Contact c = dm.NewContact();
dm.CommitAll();
Example of fetching a collection of rows
DataManager dm = new DataManager(Config.Dsn);
ContactCollection c = dm.GetContactCollection(FetchPath.Contact.Teacher.All);

Requirements

Namespace: OleroTrainingBiz

Assembly: OleroTrainingBiz (in OleroTrainingBiz.dll)

See Also

DataManager Members | OleroTrainingBiz Namespace


href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemComponentModelICustomTypeDescriptorClassGetClassNameTopic.htm">GetClassName