Table of Contents

Class EntityKernel

Namespace
The.Entities
Assembly
Instagile.dll

The dynamic core of an entity.

[DataContract]
public sealed class EntityKernel : IHasChanges
Inheritance
EntityKernel
Implements
Inherited Members

Remarks

Entity kernels consist logically of:

  • an ID
  • a databinding context
  • attributes and metadata injected by generated code

Fields

Attributes

[DataMember]
public readonly AttributeBase[] Attributes

Field Value

AttributeBase[]

Context

public readonly IEntityContext Context

Field Value

IEntityContext

Relationships

public readonly RelationshipProperty[] Relationships

Field Value

RelationshipProperty[]

Wrapper

public readonly IEntity Wrapper

Field Value

IEntity

Properties

ID

public Guid ID { get; }

Property Value

Guid

Metadata

public IEntityInfo Metadata { get; }

Property Value

IEntityInfo

State

public RowState State { get; }

Property Value

RowState

Text

public string Text { get; }

Property Value

string

active

public bool active { get; set; }

Property Value

bool

createdBy

public string createdBy { get; }

Property Value

string

createdOn

public DateTimeOffset createdOn { get; }

Property Value

DateTimeOffset

modifiedBy

public string modifiedBy { get; }

Property Value

string

modifiedOn

public DateTimeOffset modifiedOn { get; }

Property Value

DateTimeOffset

version

public ulong version { get; set; }

Property Value

ulong

Methods

CalculateAsync()

public Task CalculateAsync()

Returns

Task

Clone(IEntityContext, CloneState?)

Copy the graph rooted at this entity into another context, overwriting data already present

public EntityKernel Clone(IEntityContext context, CloneState? state = null)

Parameters

context IEntityContext

Target context, destructively updated

state CloneState

Set of entity IDs already copied

Returns

EntityKernel

Differently-contextualised version of this entity

Copy(IEntityContext)

public EntityKernel Copy(IEntityContext context)

Parameters

context IEntityContext

Returns

EntityKernel

HasAttributeChanges()

public bool HasAttributeChanges()

Returns

bool

HasChanges()

true if the current value differs from its original

public bool HasChanges()

Returns

bool

MarkDeleted()

public void MarkDeleted()

MarkUnchanged()

update original data so that it's no longer considered changed

public void MarkUnchanged()

NeedsSave()

true if the value has non-derived changes, ones made deliberately by a user or business logic

public bool NeedsSave()

Returns

bool

PruneAsync(BreakRelationships, CancellationToken?)

public Task PruneAsync(BreakRelationships relationships, CancellationToken? cancellationToken = null)

Parameters

relationships BreakRelationships
cancellationToken CancellationToken?

Returns

Task

PruneLoaded(BreakRelationships)

public void PruneLoaded(BreakRelationships relationships)

Parameters

relationships BreakRelationships

SaveAsync(CancellationToken?)

public Task<SaveResult> SaveAsync(CancellationToken? cancellationToken = null)

Parameters

cancellationToken CancellationToken?

Returns

Task<SaveResult>

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.