The requested page is not available for the requested platform. You are viewing the content for Default platform.

BaseObjectSpace.CreateObject<ObjectType>() Method

Creates an object of the type designated by the specified generic type parameter.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v19.1.dll

Declaration

public ObjectType CreateObject<ObjectType>()
Public Function CreateObject(Of ObjectType) As ObjectType

Returns

Type Description
ObjectType

A created object of the specified type.

Type Parameters

Name Description
ObjectType

Remarks

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 object 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.

See Also