Show / Hide Table of Contents

    Class CharacterRepository

    Class that represents a character repository.

    Inheritance
    System.Object
    GenericReadOnlyRepository<CharacterEntity>
    GenericRepository<CharacterEntity>
    CharacterRepository
    Implements
    IReadOnlyRepository<CharacterEntity>
    IRepository<ICharacterEntity>
    IReadOnlyRepository<ICharacterEntity>
    Inherited Members
    GenericRepository<CharacterEntity>.Add(CharacterEntity)
    GenericRepository<CharacterEntity>.AddRange(IEnumerable<CharacterEntity>)
    GenericRepository<CharacterEntity>.Remove(CharacterEntity)
    GenericRepository<CharacterEntity>.RemoveRange(IEnumerable<CharacterEntity>)
    GenericReadOnlyRepository<CharacterEntity>.Context
    GenericReadOnlyRepository<CharacterEntity>.GetById(String)
    GenericReadOnlyRepository<CharacterEntity>.GetAll()
    GenericReadOnlyRepository<CharacterEntity>.FindMany(Expression<Func<CharacterEntity, Boolean>>)
    GenericReadOnlyRepository<CharacterEntity>.FindOne(Expression<Func<CharacterEntity, 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 CharacterRepository : GenericRepository<CharacterEntity>, IReadOnlyRepository<CharacterEntity>, IRepository<ICharacterEntity>, IReadOnlyRepository<ICharacterEntity>

    Constructors

    | Improve this Doc View Source

    CharacterRepository(DbContext)

    Initializes a new instance of the CharacterRepository class.

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

    The context to initialize the repository with.

    Methods

    | Improve this Doc View Source

    Add(ICharacterEntity)

    Adds an character to the set in the context.

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

    The character to add.

    | Improve this Doc View Source

    AddRange(IEnumerable<ICharacterEntity>)

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

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

    The character range to add.

    | Improve this Doc View Source

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

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

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

    The expression to satisfy.

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

    The collection of entities retrieved.

    | Improve this Doc View Source

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

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

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

    The expression to satisfy.

    Returns
    Type Description
    ICharacterEntity

    The character found.

    | Improve this Doc View Source

    Remove(ICharacterEntity)

    Removes an entity from the set in the context.

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

    The entity to remove.

    | Improve this Doc View Source

    RemoveRange(IEnumerable<ICharacterEntity>)

    Removes multiple entities from the repository.

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

    The entities to remove.

    Explicit Interface Implementations

    | Improve this Doc View Source

    IReadOnlyRepository<ICharacterEntity>.GetAll()

    Gets all the entities from the set in the context.

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

    The collection of entities retrieved.

    | Improve this Doc View Source

    IReadOnlyRepository<ICharacterEntity>.GetById(String)

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

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

    The id to match.

    Returns
    Type Description
    ICharacterEntity

    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.