All docs
V20.2
20.2
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

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

[Browsable(false)]
public static bool ThrowExceptionForNotRegisteredEntityType
<Browsable(False)>
Public Shared ThrowExceptionForNotRegisteredEntityType As Boolean

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;
        // ...
    }
    // ...
}
See Also