Figure 1. Create a Root Object.
You create root objects by calling a factory method, a method you call to create an object. Root objects are shared methods on the class; The Shared method uses the data portal to load the object with default values. It requires several steps to create a Root object:
1. Call the factory method.
2. The factory method calls DataPortal.Create() to get the business object.
3. The data portal creates a new instance of the business object.
4. The business object can do basic initialization in the constructor.
5. The DataPortal_Create() method is called, and this is where the business object implements data access code to load its default values.
6. The business object is returned.
Note that from the business object's perspective, two methods are called: the default constructor and DataPortal_Create().