NPersistence Reference Guide
Assembly: NPersistence (in NPersistence.dll) Version: 2.0.0.0 (2.0.0.0)
Specifies that an index should be placed on the column or group of columns.
CopyC#
Namespace: NPersistence.Ext
Examples

Example 1: 2 different indices for the 2 columns [Index] public String getName() { return name; } [Index] public String getDescription() { return description; } Example 2: Both columns included in one index. [Index(Name="ix1")] public String getName() { return name; } [Index(Name="ix1")] public String getDescription() { return description; } Example 3: The Index annotation is defined at the Entity level [Index(Name="ix1", Members=new String[]{"name", "description"})] [Entity] public class Person ... public String getName() { return name; } public String getDescription() { return description; }
Assembly: NPersistence (in NPersistence.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax
C# |
public sealed class Index : Attribute
Members
All Members | Constructors ![]() | Fields ![]() |
![]() ![]() | ![]() ![]() ![]() | ![]() ![]() | ![]() ![]() ![]() ![]() |
Member | Description | |
---|---|---|
![]() | Index()()()() | Initializes a new instance of the Index class |
![]() | Members |
Member names that compose this index.
Relevant only when the Index annotation is used on a class.
Returns:
member names that compose this index
|
![]() | Name |
(Optional) Name of the index, if not specified defaults to a generated index name given by the vendor.
Default value:
""
|
Inheritance Hierarchy
System..::..Object
System..::..Attribute
NPersistence.Ext..::..Index
System..::..Attribute
NPersistence.Ext..::..Index