EdmRelationshipAttribute 类
[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]
定义两个实体类型之间的基于概念性模型中关联的关系。
继承层次结构
System.Object
System.Attribute
System.Data.Entity.Core.Objects.DataClasses.EdmRelationshipAttribute
命名空间: System.Data.Entity.Core.Objects.DataClasses
程序集: EntityFramework(在 EntityFramework.dll 中)
语法
声明
<AttributeUsageAttribute(AttributeTargets.Assembly, AllowMultiple := True)> _
Public NotInheritable Class EdmRelationshipAttribute _
Inherits Attribute
用法
Dim instance As EdmRelationshipAttribute
[AttributeUsageAttribute(AttributeTargets.Assembly, AllowMultiple = true)]
public sealed class EdmRelationshipAttribute : Attribute
[AttributeUsageAttribute(AttributeTargets::Assembly, AllowMultiple = true)]
public ref class EdmRelationshipAttribute sealed : public Attribute
[<SealedAttribute>]
[<AttributeUsageAttribute(AttributeTargets.Assembly, AllowMultiple = true)>]
type EdmRelationshipAttribute =
class
inherit Attribute
end
public final class EdmRelationshipAttribute extends Attribute
EdmRelationshipAttribute 类型公开以下成员。
构造函数
名称 | 描述 | |
---|---|---|
EdmRelationshipAttribute(String, String, String, RelationshipMultiplicity, Type, String, RelationshipMultiplicity, Type) | 创建 EdmRelationshipAttribute 类的实例。 | |
EdmRelationshipAttribute(String, String, String, RelationshipMultiplicity, Type, String, RelationshipMultiplicity, Type, Boolean) | 初始化 EdmRelationshipAttribute 类的新实例。 |
顶部
属性
名称 | 描述 | |
---|---|---|
IsForeignKey | 获取一个布尔值,该值指示关系是否基于外键值。 | |
RelationshipName | 关系的名称。 | |
RelationshipNamespaceName | 关系的命名空间。 | |
Role1Multiplicity | 关系一端的重数。 | |
Role1Name | 关系一端的角色名称。 | |
Role1Type | 关系一端的实体类型。 | |
Role2Multiplicity | 关系另一端的重数。 | |
Role2Name | 关系另一端的角色名称。 | |
Role2Type | 关系另一端的实体类型。 | |
TypeId | (继承自 Attribute。) |
顶部
方法
名称 | 描述 | |
---|---|---|
Equals | (继承自 Attribute。) | |
GetHashCode | (继承自 Attribute。) | |
GetType | (继承自 Object。) | |
IsDefaultAttribute | (继承自 Attribute。) | |
Match | (继承自 Attribute。) | |
ToString | (继承自 Object。) |
顶部
显式接口实现
名称 | 描述 | |
---|---|---|
_Attribute.GetIDsOfNames | (继承自 Attribute。) | |
_Attribute.GetTypeInfo | (继承自 Attribute。) | |
_Attribute.GetTypeInfoCount | (继承自 Attribute。) | |
_Attribute.Invoke | (继承自 Attribute。) |
顶部
线程安全
此类型的任何公共 static(在 Visual Basic 中为 Shared) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。