Table of Contents

Interface IRepository

Namespace
GroupeIsa.Neos.Domain.Persistence
Assembly
GroupeIsa.Neos.Domain.Abstractions.dll

Represents a repository.

public interface IRepository

Properties

EntityName

Gets the entity name.

string EntityName { get; }

Property Value

string

EntityType

Gets the entity type.

Type EntityType { get; }

Property Value

Type

KeyPropertyNames

Gets the names of the properties of the key.

IReadOnlyList<string> KeyPropertyNames { get; }

Property Value

IReadOnlyList<string>

Methods

GetAll()

Retrieves all entities from the data source.

IEnumerable<BusinessEntity> GetAll()

Returns

IEnumerable<BusinessEntity>

An enumerable collection of all entities in the data source.

GetAll(bool?)

Retrieves all entities from the data source.

IEnumerable<BusinessEntity> GetAll(bool? asTracking)

Parameters

asTracking bool?

Specifies whether the returned entities should be tracked for changes. If true, entities are tracked; if false, entities are not tracked. If null, the default tracking behavior is used.

Returns

IEnumerable<BusinessEntity>

An enumerable collection of all entities in the data source.

GetAllAsync()

Retrieves all entities of from the data source.

IAsyncEnumerable<BusinessEntity> GetAllAsync()

Returns

IAsyncEnumerable<BusinessEntity>

An enumerable collection of all entities in the data source.

GetAllAsync(bool?)

Retrieves all entities from the data source.

IAsyncEnumerable<BusinessEntity> GetAllAsync(bool? asTracking)

Parameters

asTracking bool?

Specifies whether the returned entities should be tracked for changes. If true, entities are tracked; if false, entities are not tracked. If null, the default tracking behavior is used.

Returns

IAsyncEnumerable<BusinessEntity>

An enumerable collection of all entities in the data source.

GetKeyValues(BusinessEntity)

Gets the key of an entity.

object[] GetKeyValues(BusinessEntity entity)

Parameters

entity BusinessEntity

Entity.

Returns

object[]

Key.

GetOriginal(BusinessEntity)

Gets the original state of an entity, regardless of its concrete type.

BusinessEntity GetOriginal(BusinessEntity entity)

Parameters

entity BusinessEntity

Modified entity.

Returns

BusinessEntity

The entity in its original state.

Remarks

Default interface implementation so adding this member does not break external implementers. Any IRepository<TEntity> automatically bridges this to its typed GetOriginal overload; this throwing default only applies to a repository that implements the non-generic IRepository alone.