Specifies whether a property should be considered as a key property.
- Namespace
- DbSyncKit
.DB .Attributes - Base Types
-
- Attribute
graph BT
Type-->Base0["Attribute"]
Type["KeyPropertyAttribute"]
class Type type-node
Syntax
[AttributeUsage(AttributeTargets.Property)]
public class KeyPropertyAttribute : Attribute
Remarks
This attribute can be applied to properties within a class to indicate that the marked property
should be treated as a key property. It is typically used to identify properties that uniquely
identify instances of the class in database operations such as insert, update, and delete.
Attributes
Type | Description |
---|---|
AttributeUsage |
Constructors
Name | Summary |
---|---|
KeyPropertyAttribute |
Initializes a new instance of the KeyPropertyAttribute class.
|
Properties
Name | Property Type | Summary |
---|---|---|
IsComparable | bool |
Gets a value indicating whether the property is comparable.
|
IsPrimaryKey | bool |
Gets a value indicating whether the property is a primary key.
|
KeyProperty | bool |
Gets a value indicating whether the property should be considered as a key property.
|