Share via


DbContext.ValidateEntity 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 customize validation of an entity or filter out validation results. Called by GetValidationErrors().

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

Syntax

protected virtual DbEntityValidationResult ValidateEntity(
    DbEntityEntry entityEntry,
    IDictionary<Object, Object> items
)

Parameters

Return Value

Type: System.Data.Entity.Validation.DbEntityValidationResult
Entity validation result. Possibly null when overridden.

See Also

Reference

DbContext Class

System.Data.Entity Namespace