EdmScalarPropertyAttribute 类
[本页针对的是实体框架版本 6。最新版本以“实体框架”NuGet 包的形式提供。有关实体框架的更多信息,请参见 msdn.com/data/ef。]
IEntity 中标量属性的特性。 隐含的默认 AttributeUsage 属性 Inherited=True、AllowMultiple=False。元数据系统要求此行为,并且将仅查看其中每个特性的第一个,即使存在多个。
继承层次结构
System.Object
System.Attribute
System.Data.Entity.Core.Objects.DataClasses.EdmPropertyAttribute
System.Data.Entity.Core.Objects.DataClasses.EdmScalarPropertyAttribute
命名空间: System.Data.Entity.Core.Objects.DataClasses
程序集: EntityFramework(在 EntityFramework.dll 中)
语法
声明
<AttributeUsageAttribute(AttributeTargets.Property)> _
Public NotInheritable Class EdmScalarPropertyAttribute _
Inherits EdmPropertyAttribute
用法
Dim instance As EdmScalarPropertyAttribute
[AttributeUsageAttribute(AttributeTargets.Property)]
public sealed class EdmScalarPropertyAttribute : EdmPropertyAttribute
[AttributeUsageAttribute(AttributeTargets::Property)]
public ref class EdmScalarPropertyAttribute sealed : public EdmPropertyAttribute
[<SealedAttribute>]
[<AttributeUsageAttribute(AttributeTargets.Property)>]
type EdmScalarPropertyAttribute =
class
inherit EdmPropertyAttribute
end
public final class EdmScalarPropertyAttribute extends EdmPropertyAttribute
EdmScalarPropertyAttribute 类型公开以下成员。
构造函数
名称 | 描述 | |
---|---|---|
EdmScalarPropertyAttribute | 初始化 EdmScalarPropertyAttribute 类的新实例。 |
顶部
属性
名称 | 描述 | |
---|---|---|
EntityKeyProperty | 获取或设置一个值,该值指示属性是否为实体键的一部分。 | |
IsNullable | 获取或设置一个值,该值指示属性是否可以具有 null 值。 | |
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) 成员都是线程安全的。但不保证所有实例成员都是线程安全的。