Indicates the property which is the primary key.
Namespace: Castle.ActiveRecord
Assembly: Castle.ActiveRecord (in Castle.ActiveRecord.dll)
Version: 1.0.3.0
Syntax
| C# |
|---|
[SerializableAttribute] [AttributeUsageAttribute(AttributeTargets.Property, AllowMultiple = false)] public class PrimaryKeyAttribute : WithAccessAttribute |
Examples
public class Blog : ActiveRecordBase { ... [PrimaryKey(PrimaryKeyType.Native)] public int Id { get { return _id; } set { _id = value; } } |
Inheritance Hierarchy
System..::Object
System..::Attribute
Castle.ActiveRecord..::WithAccessAttribute
Castle.ActiveRecord..::PrimaryKeyAttribute
System..::Attribute
Castle.ActiveRecord..::WithAccessAttribute
Castle.ActiveRecord..::PrimaryKeyAttribute
See Also
PrimaryKeyAttribute Members
Castle.ActiveRecord Namespace