BaseObjectSpace.ThrowExceptionForNotRegisteredEntityType Field
Certain Object Space methods have the Type parameters. This static field indicates whether these methods throw the ArgumentException when a passed type is not registered in the Object Space Provider's entity store. Set this field to true to diagnose issues related to the incorrect use of the Object Space type (for example, when a persistent Object Space is used to manipulate non-persistent objects).
Namespace: DevExpress.ExpressApp
Assembly: DevExpress.ExpressApp.v20.2.dll
Declaration
Field Value
Type | Description |
---|---|
Boolean | true, if Object Space methods that have the Type parameters throw the ArgumentException when a passed type is not registered in the Object Space Provider's entity store; otherwise, false. |
Remarks
You can specify this static field in one of the following locations:
- in the constructor of your platform-agnostic module located in the Module.cs (Module.vb) file;
- in the constructor of your application located in the WinApplication.cs (WinApplication.vb) or WebApplication.cs (WebApplication.vb) file;
- in the Main method of the WinForms application located in the Program.cs (Program.vb) file, before the WinApplication.Start call;
- in the Application_Start method of the ASP.NET application located in the Global.asax.cs (Global.asax.vb) file, before the WebApplication.Start call.
The following example shows how to specify this field in a WinForms application.
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Win;
// ...
public partial class MySolutionWindowsFormsApplication : WinApplication {
static MySolutionWin() {
BaseObjectSpace.ThrowExceptionForNotRegisteredEntityType = true;
// ...
}
// ...
}