DbEntityEntry.GetValidationResult 方法
[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]
验证此 DbEntityEntry 实例并返回验证结果。
命名空间: System.Data.Entity.Infrastructure
程序集: EntityFramework(在 EntityFramework.dll 中)
语法
声明
<SuppressMessageAttribute("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")> _
Public Function GetValidationResult As DbEntityValidationResult
用法
Dim instance As DbEntityEntry
Dim returnValue As DbEntityValidationResult
returnValue = instance.GetValidationResult()
[SuppressMessageAttribute("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")]
public DbEntityValidationResult GetValidationResult()
[SuppressMessageAttribute(L"Microsoft.Design", L"CA1024:UsePropertiesWhereAppropriate")]
public:
DbEntityValidationResult^ GetValidationResult()
[<SuppressMessageAttribute("Microsoft.Design", "CA1024:UsePropertiesWhereAppropriate")>]
member GetValidationResult : unit -> DbEntityValidationResult
public function GetValidationResult() : DbEntityValidationResult
返回值
类型:System.Data.Entity.Validation.DbEntityValidationResult
实体验证结果。如果重写 ValidateEntity(DbEntityEntry, IDictionary<Object, Object>) 方法,则可能为 Null。