DbContext.ValidateEntity Method (DbEntityEntry, IDictionary(Of Object, Object))

Entity Framework 6.0
 

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)

Protected Overridable Function ValidateEntity (
	entityEntry As DbEntityEntry,
	items As IDictionary(Of Object, Object)
) As DbEntityValidationResult

Parameters

entityEntry
Type: System.Data.Entity.Infrastructure.DbEntityEntry

DbEntityEntry instance to be validated.

items
Type: System.Collections.Generic.IDictionary(Of Object, Object)

User-defined dictionary containing additional info for custom validation. It will be passed to ValidationContext and will be exposed as Items . This parameter is optional and can be null.

Return Value

Type: System.Data.Entity.Validation.DbEntityValidationResult

Entity validation result. Possibly null when overridden.

Return to top
Show: