Interface IPersistableType
Non generic interface describing an entity that can be persisted to a database. See IPersistableType<T> for more information.
Namespace: Neon.Data
Assembly: Neon.Common.dll
Syntax
public interface IPersistableType
Properties
__T
Identifies the entity type.
Declaration
string __T { get; }
Property Value
| Type | Description |
|---|---|
| string |
Methods
GetKey()
Returns the Couchbase or other database key to be used to persist or retrieve the entity. By convention for Couchbase, this key includes the entity type plus the unique key formatted like entity-type::unique-key. For example:
user::122330
This identifies the document as a user with unique ID as 122330. Document IDs are formatted like this so that we'll be able to take advantage of document filtering by type when we've enabled Couchbase cross datacenter replication.
Declaration
string GetKey()
Returns
| Type | Description |
|---|---|
| string | The database key for the entity. |
__Load(JObject, bool)
Loads the entity properties from the backing JObject or from the optional JObject passed.
Declaration
void __Load(JObject source = null, bool isDerived = false)
Parameters
| Type | Name | Description |
|---|---|---|
| JObject | source | Optional source object. |
| bool | isDerived | Optionally indicates that were deserializing a derived class. |
__Save()
Persists the object properties to the backing JObject.
Declaration
JObject __Save()
Returns
| Type | Description |
|---|---|
| JObject | The backing JObject. |