Table of Contents

Class CachedRepo<TEntity>

Namespace
Tlabs.Data.Repo.Intern
Assembly
Tlabs.Data.dll

IRepo<TEntity> for a small number of (cached) persistent instances.

public class CachedRepo<TEntity> : BaseNonQueryRepo<TEntity>, ICachedRepo<TEntity>, INonQueryRepo<TEntity> where TEntity : class, new()

Type Parameters

TEntity
Inheritance
CachedRepo<TEntity>
Implements
ICachedRepo<TEntity>
INonQueryRepo<TEntity>
Inherited Members
Extension Methods

Constructors

CachedRepo(IDataStore)

Ctor from store.

public CachedRepo(IDataStore store)

Parameters

store IDataStore

Fields

MAX_CACHE

Maximum cache size.

public const int MAX_CACHE = 300

Field Value

int

Methods

AllUntracked(Func<IQueryable<TEntity>, IQueryable<TEntity>>?)

A queryable enumeration of ALL (cached) entities of TEntity in the store (with optional querySupplement to be used e.g. for LoadRelated(...) clauses).

public IQueryable<TEntity> AllUntracked(Func<IQueryable<TEntity>, IQueryable<TEntity>>? querySupplement = null)

Parameters

querySupplement Func<IQueryable<TEntity>, IQueryable<TEntity>>

Returns

IQueryable<TEntity>

Remarks

Changes to returned entities are NOT beeing tracked.

InsertOrUpdate(TEntity)

(Mark) ent as updated or inserted.

public TEntity InsertOrUpdate(TEntity ent)

Parameters

ent TEntity

Returns

TEntity