ModelValidator.ValidateNoShadowEntities 方法

定义

重载

ValidateNoShadowEntities(IModel)

此 API 支持 Entity Framework Core 基础结构,不应直接从代码使用。 将来的版本中可能会更改或删除此 API。

ValidateNoShadowEntities(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)
已过时.

验证模型是否不包含任何没有相应的 CLR 类型的实体类型。

ValidateNoShadowEntities(IModel)

此 API 支持 Entity Framework Core 基础结构,不应直接从代码使用。 将来的版本中可能会更改或删除此 API。

protected virtual void ValidateNoShadowEntities (Microsoft.EntityFrameworkCore.Metadata.IModel model);
abstract member ValidateNoShadowEntities : Microsoft.EntityFrameworkCore.Metadata.IModel -> unit
override this.ValidateNoShadowEntities : Microsoft.EntityFrameworkCore.Metadata.IModel -> unit
Protected Overridable Sub ValidateNoShadowEntities (model As IModel)

参数

model
IModel

适用于

ValidateNoShadowEntities(IModel, IDiagnosticsLogger<DbLoggerCategory.Model.Validation>)

注意

Shadow entity types cannot be created anymore

验证模型是否不包含任何没有相应的 CLR 类型的实体类型。

protected virtual void ValidateNoShadowEntities (Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation> logger);
[System.Obsolete("Shadow entity types cannot be created anymore")]
protected virtual void ValidateNoShadowEntities (Microsoft.EntityFrameworkCore.Metadata.IModel model, Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation> logger);
abstract member ValidateNoShadowEntities : Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation> -> unit
override this.ValidateNoShadowEntities : Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation> -> unit
[<System.Obsolete("Shadow entity types cannot be created anymore")>]
abstract member ValidateNoShadowEntities : Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation> -> unit
override this.ValidateNoShadowEntities : Microsoft.EntityFrameworkCore.Metadata.IModel * Microsoft.EntityFrameworkCore.Diagnostics.IDiagnosticsLogger<Microsoft.EntityFrameworkCore.DbLoggerCategory.Model.Validation> -> unit
Protected Overridable Sub ValidateNoShadowEntities (model As IModel, logger As IDiagnosticsLogger(Of DbLoggerCategory.Model.Validation))

参数

model
IModel

要验证的模型。

logger
IDiagnosticsLogger<DbLoggerCategory.Model.Validation>

要使用的记录器。

属性

适用于