Interface IPersistableType<T>
Generic interface describing an entity that can be persisted to a database.
Inherited Members
Namespace: Neon.Data
Assembly: Neon.Common.dll
Syntax
public interface IPersistableType<T> : IPersistableType where T : class, IRoundtripData, new()
Type Parameters
Name | Description |
---|---|
T | Specifies the data type being persisted. |
Remarks
All entities must implement the __T property such that it returns the bucket unique string that identifies the entity type. This string will be used to distinguish entity types within a Couchbase bucket.
This interface supports the related concepts of entity key and ref. The entity key is the string used to persist an entity instance to Couchbase. By convention, this string is generally prefixed by the entity type and then is followed by instance specific properties, a UUID, or a singleton name.
Entity ref is the value that other entities can use to reference an entity instance. This could be the same as the entity key but typically without the entity type prefix for brevity,
As a convention, many IPersistableType<T> implementations also have a static
GetKey(...) method that returns the Couchbase key for an entity based on parameters passed.