NPersistence Reference Guide
The simplest type of mapping to a database column. The Basic annotation can be applied to a persistent property or instance variable of any of the following types:

primitive types, wrappers of the primitive types, String,

System.Numerics.BigInteger,

System.Decimal,

System.DateTime,

System.Data.DbType.Date,

System.Data.DbType.Time,

System.Data.DbType.Timestamp, byte[], Byte[],

char[], Character[], enums, and any other type that implements System.Runtime.Serialization.ISerializable.

The use of the Basic annotation is optional for persistent fields and properties of these types. If the Basic annotation is not specified for such a field or property, the default values of the Basic annotation will apply.

Examples

CopyC#
Example 1:

[Basic]
protected String name;

Example 2:

[Basic(fetch=LAZY)]
protected String getName() { return name; }

Namespace: NPersistence
Assembly: NPersistence (in NPersistence.dll) Version: 2.0.0.0 (2.0.0.0)

Syntax

   
 C# 
public sealed class Basic : Attribute

Members

         
 All Members  Constructors   Fields  
 Public

 Protected
 Instance

 Static 
 Declared

 Inherited
 XNA Framework Only 

 .NET Compact Framework Only 

 MemberDescription
Basic()()()()
Initializes a new instance of the Basic class
Fetch
(Optional) Defines whether the value of the field or property should be lazily loaded or must be eagerly fetched. The EAGER strategy is a requirement on the persistence provider runtime that the value must be eagerly fetched. The LAZY strategy is a hint to the persistence provider runtime. If not specified, defaults to EAGER.
Optional
(Optional) Defines whether the value of the field or property may be null. This is a hint and is disregarded for primitive types; it may be used in schema generation. If not specified, defaults to true.

Inheritance Hierarchy

System..::..Object
  System..::..Attribute
    NPersistence..::..Basic

See Also