Table of Contents

Interface INonQueryRepo<TEntity>

Namespace
Tlabs.Data
Assembly
Tlabs.Data.dll

Interface of an non queryable TEntity repository.

public interface INonQueryRepo<TEntity>

Type Parameters

TEntity
Extension Methods

Properties

Store

Get the underlying .

IDataStore Store { get; }

Property Value

IDataStore

Methods

Attach(TEntity)

Attach given entity as unchanged (but tracked).

TEntity Attach(TEntity entity)

Parameters

entity TEntity

Returns

TEntity

Delete(IEnumerable<TEntity>)

Mark IEnumerable<T> of entities as deleted for removing from the store.

void Delete(IEnumerable<TEntity> entities)

Parameters

entities IEnumerable<TEntity>

Delete(TEntity)

Mark given entity as deleted for removing from the store.

void Delete(TEntity entity)

Parameters

entity TEntity

Evict(TEntity)

Evict given entity from beeing tracked by the repository.

void Evict(TEntity entity)

Parameters

entity TEntity

Get(params object[])

Get a persistent entity instance from the data store.

TEntity Get(params object[] ids)

Parameters

ids object[]

Returns

TEntity

GetIdentifier(TEntity)

Get the data store identifier value(s) of the given entity.

object GetIdentifier(TEntity entity)

Parameters

entity TEntity

Returns

object

Insert(IEnumerable<TEntity>)

Add an IEnumerable<T> of entities for inserting to the store.

IEnumerable<TEntity> Insert(IEnumerable<TEntity> entities)

Parameters

entities IEnumerable<TEntity>

Returns

IEnumerable<TEntity>

Insert(TEntity)

Add entity for inserting to the store.

TEntity Insert(TEntity entity)

Parameters

entity TEntity

Returns

TEntity

LoadExplicit<P>(TEntity, Expression<Func<TEntity, IEnumerable<P>>>)

Explicitly load collection prop from ent (if not already loaded).

void LoadExplicit<P>(TEntity ent, Expression<Func<TEntity, IEnumerable<P>>> prop) where P : class

Parameters

ent TEntity
prop Expression<Func<TEntity, IEnumerable<P>>>

Type Parameters

P

LoadExplicit<P>(TEntity, Expression<Func<TEntity, P?>>)

Explicitly load referenced prop from ent (if not already loaded).

void LoadExplicit<P>(TEntity ent, Expression<Func<TEntity, P?>> prop) where P : class

Parameters

ent TEntity
prop Expression<Func<TEntity, P>>

Type Parameters

P

Merge(TEntity)

Merge given ent with any persistent version.

TEntity Merge(TEntity ent)

Parameters

ent TEntity

Returns

TEntity

Remarks

Only properties with non default values are set on the persistent entity. Any property changed by the merge operation marks the entity as modified for updating with the store.

Update(IEnumerable<TEntity>)

Track IEnumerable<T> of entities as modified for updating with the store.

IEnumerable<TEntity> Update(IEnumerable<TEntity> entities)

Parameters

entities IEnumerable<TEntity>

Returns

IEnumerable<TEntity>

Update(TEntity)

Track given entity as modified for updating with the store.

TEntity Update(TEntity entity)

Parameters

entity TEntity

Returns

TEntity