Show / Hide Table of Contents

    Interface IReadOnlyRepository<TEntity>

    Interface for a generic, read-only entity repository.

    Namespace: Fibula.Data.Contracts.Abstractions
    Assembly: Fibula.Data.Contracts.dll
    Syntax
    public interface IReadOnlyRepository<TEntity>
    
        where TEntity : IIdentifiableEntity
    Type Parameters
    Name Description
    TEntity

    The entity type.

    Methods

    | Improve this Doc View Source

    FindMany(Expression<Func<TEntity, Boolean>>)

    Finds all entities that match a predicate.

    Declaration
    IEnumerable<TEntity> FindMany(Expression<Func<TEntity, bool>> predicate)
    Parameters
    Type Name Description
    System.Linq.Expressions.Expression<System.Func<TEntity, System.Boolean>> predicate

    The predicate to use for matching.

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<TEntity>

    The entities that matched the predicate.

    | Improve this Doc View Source

    FindOne(Expression<Func<TEntity, Boolean>>)

    Finds an entity in the set within the context that satisfies an expression. If more than one entity satisfies the expression, one is picked up in an unknown criteria.

    Declaration
    TEntity FindOne(Expression<Func<TEntity, bool>> predicate)
    Parameters
    Type Name Description
    System.Linq.Expressions.Expression<System.Func<TEntity, System.Boolean>> predicate

    The expression to satisfy.

    Returns
    Type Description
    TEntity

    The entity found.

    | Improve this Doc View Source

    GetAll()

    Gets a collection of all entities from a type.

    Declaration
    IEnumerable<TEntity> GetAll()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<TEntity>

    The collection of entities.

    | Improve this Doc View Source

    GetById(String)

    Gets a single entity matching the id supplied.

    Declaration
    TEntity GetById(string id)
    Parameters
    Type Name Description
    System.String id

    The id to search the entity by.

    Returns
    Type Description
    TEntity

    The entity that matched the id supplied.

    Extension Methods

    ObjectExtensions.YieldSingleItem<T>(T)
    ObjectExtensions.GetPropertyValue(Object, String)
    Validate.ThrowIfNull(Object, String)
    • Improve this Doc
    • View Source
    Back to top Copyright © 2018-2020 | The Fibula Project
    Generated using DocFX | Jose L. Nuñez de Caceres et al.