NotMappedMemberAttributeConvention 类

定义

一种约定,用于忽略具有 NotMappedAttribute的实体类型的成员。

public class NotMappedMemberAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention
public class NotMappedMemberAttributeConvention : Microsoft.EntityFrameworkCore.Metadata.Conventions.IComplexPropertyAddedConvention, Microsoft.EntityFrameworkCore.Metadata.Conventions.IEntityTypeAddedConvention
type NotMappedMemberAttributeConvention = class
    interface IEntityTypeAddedConvention
    interface IConvention
type NotMappedMemberAttributeConvention = class
    interface IEntityTypeAddedConvention
    interface IConvention
    interface IComplexPropertyAddedConvention
Public Class NotMappedMemberAttributeConvention
Implements IEntityTypeAddedConvention
Public Class NotMappedMemberAttributeConvention
Implements IComplexPropertyAddedConvention, IEntityTypeAddedConvention
继承
NotMappedMemberAttributeConvention
实现

注解

有关详细信息和示例,请参阅 模型生成约定

构造函数

NotMappedMemberAttributeConvention(ProviderConventionSetBuilderDependencies)

创建 NotMappedMemberAttributeConvention 的新实例。

属性

Dependencies

此服务的依赖项。

方法

ProcessComplexPropertyAdded(IConventionComplexPropertyBuilder, IConventionContext<IConventionComplexPropertyBuilder>)

在将复杂属性添加到类似类型的对象后调用。

ProcessEntityTypeAdded(IConventionEntityTypeBuilder, IConventionContext<IConventionEntityTypeBuilder>)

在实体类型添加到模型后调用。

ShouldIgnore(MemberInfo)

返回一个值,该值指示是否应忽略给定的 CLR 成员。

适用于