Creates an object of the specified type.
public virtual object CreateObject( Type objectType )
Public Overridable Function CreateObject( objectType As Type ) As Object
A Type object which is the type of the object to be created.
A created object of the specified type.
This method calls a protected virtual method, CreateObjectCore, which must be overridden in the BaseObjectSpace class descendants. After an object of the specified type is created, the BaseObjectSpace.SetModified method is called so that the created object is marked as modified, and therefore, is saved to the database during the next changes commit (see BaseObjectSpace.CommitChanges).
Use this method to create objects in Controllers. In a regular business class, create objects directly via their constructor.