ReferentialConstraint 构造函数

[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]

在该关系上构造一个新约束

命名空间:  System.Data.Entity.Core.Metadata.Edm
程序集:  EntityFramework(在 EntityFramework.dll 中)

语法

声明
Public Sub New ( _
    fromRole As RelationshipEndMember, _
    toRole As RelationshipEndMember, _
    fromProperties As IEnumerable(Of EdmProperty), _
    toProperties As IEnumerable(Of EdmProperty) _
)
用法
Dim fromRole As RelationshipEndMember 
Dim toRole As RelationshipEndMember 
Dim fromProperties As IEnumerable(Of EdmProperty)
Dim toProperties As IEnumerable(Of EdmProperty)

Dim instance As New ReferentialConstraint(fromRole, _
    toRole, fromProperties, toProperties)
public ReferentialConstraint(
    RelationshipEndMember fromRole,
    RelationshipEndMember toRole,
    IEnumerable<EdmProperty> fromProperties,
    IEnumerable<EdmProperty> toProperties
)
public:
ReferentialConstraint(
    RelationshipEndMember^ fromRole, 
    RelationshipEndMember^ toRole, 
    IEnumerable<EdmProperty^>^ fromProperties, 
    IEnumerable<EdmProperty^>^ toProperties
)
new : 
        fromRole:RelationshipEndMember * 
        toRole:RelationshipEndMember * 
        fromProperties:IEnumerable<EdmProperty> * 
        toProperties:IEnumerable<EdmProperty> -> ReferentialConstraint
public function ReferentialConstraint(
    fromRole : RelationshipEndMember, 
    toRole : RelationshipEndMember, 
    fromProperties : IEnumerable<EdmProperty>, 
    toProperties : IEnumerable<EdmProperty>
)

参数

异常

例外 条件
ArgumentNullException

如果任何参数为 null,则引发参数 Null 异常

请参阅

参考

ReferentialConstraint 类

System.Data.Entity.Core.Metadata.Edm 命名空间