Search Results for

    Show / Hide Table of Contents

    Interface IReadOnlyRepository<TId, TDocument, TFilter>

    Basic read only repository

    Inherited Members
    System.IDisposable.Dispose()
    Namespace: Simplic.Data.NoSql
    Assembly: Simplic.Data.dll
    Syntax
    public interface IReadOnlyRepository<TId, TDocument, TFilter> : IDisposable where TDocument : IDocument<TId> where TFilter : IFilter<TId>
    Type Parameters
    Name Description
    TId

    PK (ID) type

    TDocument

    Entity type

    TFilter

    Filter type

    Methods

    | Improve this Doc View Source

    FindAsync(TFilter, Nullable<Int32>, Nullable<Int32>, String, Boolean)

    Finds the documents matching the filter.

    Declaration
    Task<IEnumerable<TDocument>> FindAsync(TFilter predicate, int? skip, int? limit, string sortField = "", bool isAscending = true)
    Parameters
    Type Name Description
    TFilter predicate

    The filter predicate

    System.Nullable<System.Int32> skip

    Number of skipped entities

    System.Nullable<System.Int32> limit

    Number of requested entities

    System.String sortField

    Sort field

    System.Boolean isAscending

    Ascending or Descending sort

    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<TDocument>>

    TDocument entities matching the search criteria

    | Improve this Doc View Source

    GetAllAsync()

    Get all entities from data source

    Declaration
    Task<IEnumerable<TDocument>> GetAllAsync()
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<TDocument>>

    Enumerable of entities

    | Improve this Doc View Source

    GetAsync(TId)

    Get an entity by its id

    Declaration
    Task<TDocument> GetAsync(TId id)
    Parameters
    Type Name Description
    TId id
    Returns
    Type Description
    System.Threading.Tasks.Task<TDocument>

    Entity

    | Improve this Doc View Source

    GetByFilterAsync(TFilter)

    Get entities by filter

    Declaration
    Task<IEnumerable<TDocument>> GetByFilterAsync(TFilter filter)
    Parameters
    Type Name Description
    TFilter filter
    Returns
    Type Description
    System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<TDocument>>

    Enumerable of entities

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2018 SIMPLIC GmbH
    Generated by DocFx