Share via


DbContext.ShouldValidateEntity Method

[This page is specific to the Entity Framework version 6. The latest version is available as the 'Entity Framework' NuGet package. For more information about Entity Framework, see msdn.com/data/ef.]

Extension point allowing the user to override the default behavior of validating only added and modified entities.

Namespace:  System.Data.Entity
Assembly:  EntityFramework (in EntityFramework.dll)

Syntax

protected virtual bool ShouldValidateEntity(
    DbEntityEntry entityEntry
)

Parameters

Return Value

Type: System.Boolean
true to proceed with validation; false otherwise.

See Also

Reference

DbContext Class

System.Data.Entity Namespace