Interface INonQueryRepo<TEntity>
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
Methods
Attach(TEntity)
Attach given entity as unchanged (but tracked).
TEntity Attach(TEntity entity)
Parameters
entityTEntity
Returns
- TEntity
Delete(IEnumerable<TEntity>)
Mark IEnumerable<T> of entities as deleted for removing from the store.
void Delete(IEnumerable<TEntity> entities)
Parameters
entitiesIEnumerable<TEntity>
Delete(TEntity)
Mark given entity as deleted for removing from the store.
void Delete(TEntity entity)
Parameters
entityTEntity
Evict(TEntity)
Evict given entity from beeing tracked by the repository.
void Evict(TEntity entity)
Parameters
entityTEntity
Get(params object[])
Get a persistent entity instance from the data store.
TEntity Get(params object[] ids)
Parameters
idsobject[]
Returns
- TEntity
GetIdentifier(TEntity)
Get the data store identifier value(s) of the given entity.
object GetIdentifier(TEntity entity)
Parameters
entityTEntity
Returns
Insert(IEnumerable<TEntity>)
Add an IEnumerable<T> of entities for inserting to the store.
IEnumerable<TEntity> Insert(IEnumerable<TEntity> entities)
Parameters
entitiesIEnumerable<TEntity>
Returns
- IEnumerable<TEntity>
Insert(TEntity)
Add entity for inserting to the store.
TEntity Insert(TEntity entity)
Parameters
entityTEntity
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
entTEntitypropExpression<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
entTEntitypropExpression<Func<TEntity, P>>
Type Parameters
P
Merge(TEntity)
Merge given ent with any persistent version.
TEntity Merge(TEntity ent)
Parameters
entTEntity
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
entitiesIEnumerable<TEntity>
Returns
- IEnumerable<TEntity>
Update(TEntity)
Track given entity as modified for updating with the store.
TEntity Update(TEntity entity)
Parameters
entityTEntity
Returns
- TEntity