IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > EntityManagerOptions Class : ThrowAllLoadExceptions Property |
'Declaration
Public Property ThrowAllLoadExceptions As Boolean
'Usage
Dim instance As EntityManagerOptions Dim value As Boolean instance.ThrowAllLoadExceptions = value value = instance.ThrowAllLoadExceptions
public bool ThrowAllLoadExceptions {get; set;}
The default behavior is to "eat" event handler exceptions for AddOnQuery and AddOnImport actions and throw for all other actions. Set this value to true to throw the exception for all actions.
This option is used to control the behavior of handlers for the EntityManager.EntityChanging, EntityManager.EntityChanged, EntityChanging, EntityChanged Entity.PropertyChanged, EntityAspect.EntityPropertyChanged and EntityAspect.PropertyChanged events.
When set to true, if your event handler throws an exception during a load operation - which includes add, attach, query, import and some save operations - you may leave the EntityManager and/or EntityCache in an inconsistent state. You should set this value to true only if you plan to terminate your application, or clear or dispose of the EntityManager.
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2