Show / Hide Table of Contents

    Class AccountRepository

    Class that represents an accounts repository.

    Inheritance
    System.Object
    GenericReadOnlyRepository<AccountEntity>
    GenericRepository<AccountEntity>
    AccountRepository
    Implements
    IReadOnlyRepository<AccountEntity>
    IRepository<IAccountEntity>
    IReadOnlyRepository<IAccountEntity>
    Inherited Members
    GenericRepository<AccountEntity>.Add(AccountEntity)
    GenericRepository<AccountEntity>.AddRange(IEnumerable<AccountEntity>)
    GenericRepository<AccountEntity>.Remove(AccountEntity)
    GenericRepository<AccountEntity>.RemoveRange(IEnumerable<AccountEntity>)
    GenericReadOnlyRepository<AccountEntity>.Context
    GenericReadOnlyRepository<AccountEntity>.GetById(String)
    GenericReadOnlyRepository<AccountEntity>.GetAll()
    GenericReadOnlyRepository<AccountEntity>.FindMany(Expression<Func<AccountEntity, Boolean>>)
    GenericReadOnlyRepository<AccountEntity>.FindOne(Expression<Func<AccountEntity, Boolean>>)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: Fibula.Data.Repositories
    Assembly: Fibula.Data.dll
    Syntax
    public class AccountRepository : GenericRepository<AccountEntity>, IReadOnlyRepository<AccountEntity>, IRepository<IAccountEntity>, IReadOnlyRepository<IAccountEntity>

    Constructors

    | Improve this Doc View Source

    AccountRepository(DbContext)

    Initializes a new instance of the AccountRepository class.

    Declaration
    public AccountRepository(DbContext context)
    Parameters
    Type Name Description
    Microsoft.EntityFrameworkCore.DbContext context

    The context to initialize the repository with.

    Methods

    | Improve this Doc View Source

    Add(IAccountEntity)

    Adds an account to the set in the context.

    Declaration
    public void Add(IAccountEntity entity)
    Parameters
    Type Name Description
    IAccountEntity entity

    The account to add.

    | Improve this Doc View Source

    AddRange(IEnumerable<IAccountEntity>)

    Adds a range of accounts to the set in the context.

    Declaration
    public void AddRange(IEnumerable<IAccountEntity> entities)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<IAccountEntity> entities

    The account range to add.

    | Improve this Doc View Source

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

    Finds all the entities in the set within the context that satisfy an expression.

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

    The expression to satisfy.

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

    The collection of entities retrieved.

    | Improve this Doc View Source

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

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

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

    The expression to satisfy.

    Returns
    Type Description
    IAccountEntity

    The account found.

    | Improve this Doc View Source

    Remove(IAccountEntity)

    Removes an entity from the set in the context.

    Declaration
    public void Remove(IAccountEntity entity)
    Parameters
    Type Name Description
    IAccountEntity entity

    The entity to remove.

    | Improve this Doc View Source

    RemoveRange(IEnumerable<IAccountEntity>)

    Removes multiple entities from the repository.

    Declaration
    public void RemoveRange(IEnumerable<IAccountEntity> entities)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<IAccountEntity> entities

    The entities to remove.

    Explicit Interface Implementations

    | Improve this Doc View Source

    IReadOnlyRepository<IAccountEntity>.GetAll()

    Gets all the entities from the set in the context.

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

    The collection of entities retrieved.

    | Improve this Doc View Source

    IReadOnlyRepository<IAccountEntity>.GetById(String)

    Gets an entity that matches an id, from the context.

    Declaration
    IAccountEntity IReadOnlyRepository<IAccountEntity>.GetById(string id)
    Parameters
    Type Name Description
    System.String id

    The id to match.

    Returns
    Type Description
    IAccountEntity

    The entity found, if any.

    Implements

    IReadOnlyRepository<TEntity>
    IRepository<TEntity>
    IReadOnlyRepository<TEntity>

    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.