NPersistence Reference Guide
Assembly: NPersistence (in NPersistence.dll) Version: 2.0.0.0 (2.0.0.0)
Specifies the enum type for a map key whose basic type is an enumerated type.
Namespace: NPersistenceThe MapKeyEnumerated annotation can be applied to an element collection or relationship of type System.Collections.Generic.Dictionary, in conjunction with the ElementCollection, OneToMany, or ManyToMany annotation.
If the enumerated type is not specified or the MapKeyEnumerated annotation is not used, the enumerated type is assumed to be ORDINAL.
Examples
CopyC#
Example: public enum ProjectStatus {COMPLETE, DELAYED, CANCELLED, IN_PROGRESS} public enum SalaryRate {JUNIOR, SENIOR, MANAGER, EXECUTIVE} [Entity] public class Employee { [ManyToMany] public Projects<ProjectStatus, Project> getProjects() {...} [OneToMany] [MapKeyEnumerated(STRING)] public Dictionary<SalaryRate, Employee> getEmployees() {...} ... }
Assembly: NPersistence (in NPersistence.dll) Version: 2.0.0.0 (2.0.0.0)
Syntax
C# |
public sealed class MapKeyEnumerated : Attribute
Members
All Members | Constructors | Fields |
Public Protected | Instance Static | Declared Inherited | XNA Framework Only .NET Compact Framework Only |
Member | Description | |
---|---|---|
MapKeyEnumerated()()()() | Initializes a new instance of the MapKeyEnumerated class | |
MapKeyEnumerated(EnumType) | Initializes a new instance of the MapKeyEnumerated class | |
Value | (Optional) The type used in mapping a map key enum type.
|
Inheritance Hierarchy
System..::..Object
System..::..Attribute
NPersistence..::..MapKeyEnumerated
System..::..Attribute
NPersistence..::..MapKeyEnumerated