Skip to main content
.NET Framework 4.5.2+

ITypesInfo.GenerateEntities() Method

Generates actual business classes into the default assembly, based on the registered Domain Components.

Namespace: DevExpress.ExpressApp.DC

Assembly: DevExpress.ExpressApp.v22.2.dll

NuGet Package: DevExpress.ExpressApp


void GenerateEntities()


This method generates business classes based on the Domain Components registered via the ITypesInfo.RegisterEntity method into the default assembly. This assembly is used for caching purposes, so that actual business classes are not regenerated on each application start. You can specify a custom assembly to be used for generation via the GenerateEntities method overload, taking a generatedAssemblyFile parameter.

The GenerateEntities method is used internally in XAF, and normally, it should not be called from your code. However, when creating unit tests for Domain Components, you need to call the GenerateEntities method, so that you can instantiate them. To see an example of using this method, refer to the How to: Test Validation Rules help topic.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the GenerateEntities() method.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also