DbContext.ValidateEntity (Método)

[Esta página es específica de la versión 6 de Entity Framework. La versión más reciente está disponible como el paquete NuGet de Entity Framework. Para más información sobre Entity Framework, consulte msdn.com/es-ES/data/ef].

Punto de extensión que permite al usuario personalizar la validación de una entidad o filtrar los resultados de la validación. Lo llama el método GetValidationErrors().

Espacio de nombres:  System.Data.Entity
Ensamblado:  EntityFramework (en EntityFramework.dll)

Sintaxis

'Declaración
Protected Overridable Function ValidateEntity ( _
    entityEntry As DbEntityEntry, _
    items As IDictionary(Of Object, Object) _
) As DbEntityValidationResult
'Uso
Dim entityEntry As DbEntityEntry 
Dim items As IDictionary(Of Object, Object)
Dim returnValue As DbEntityValidationResult 

returnValue = Me.ValidateEntity(entityEntry, _
    items)
protected virtual DbEntityValidationResult ValidateEntity(
    DbEntityEntry entityEntry,
    IDictionary<Object, Object> items
)
protected:
virtual DbEntityValidationResult^ ValidateEntity(
    DbEntityEntry^ entityEntry, 
    IDictionary<Object^, Object^>^ items
)
abstract ValidateEntity : 
        entityEntry:DbEntityEntry * 
        items:IDictionary<Object, Object> -> DbEntityValidationResult  
override ValidateEntity : 
        entityEntry:DbEntityEntry * 
        items:IDictionary<Object, Object> -> DbEntityValidationResult
protected function ValidateEntity(
    entityEntry : DbEntityEntry, 
    items : IDictionary<Object, Object>
) : DbEntityValidationResult

Parámetros

Valor devuelto

Tipo: System.Data.Entity.Validation.DbEntityValidationResult
El resultado de la validación de la entidad.El valor puede ser null cuando se reemplaza.

Vea también

Referencia

DbContext Clase

System.Data.Entity (Espacio de nombres)