Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ValidateEntity Method

DbContext::ValidateEntity Method (DbEntityEntry^, IDictionary<Object^, Object^>^)


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)

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


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

DbEntityEntry instance to be validated.

Type: System.Collections.Generic::IDictionary<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
© 2015 Microsoft