Search Results for

    Show / Hide Table of Contents

    Class SqlServiceBase<TId, TModel>

    Implements the basic service method with a repository that derives from IRepositoryBase<TId, TModel>

    Inheritance
    System.Object
    SqlServiceBase<TId, TModel>
    Implements
    IRepositoryBase<TId, TModel>
    Inherited Members
    System.Object.ToString()
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    Namespace: Simplic.Data
    Assembly: Simplic.Data.dll
    Syntax
    public abstract class SqlServiceBase<TId, TModel> : IRepositoryBase<TId, TModel>
    Type Parameters
    Name Description
    TId

    A key which represents the primary key in the database

    TModel

    A model that contains the necessary information

    Constructors

    | Improve this Doc View Source

    SqlServiceBase(IRepositoryBase<TId, TModel>)

    Constructor for dependency injection

    Declaration
    public SqlServiceBase(IRepositoryBase<TId, TModel> repositoryBase)
    Parameters
    Type Name Description
    IRepositoryBase<TId, TModel> repositoryBase

    A repository that handles the data acess layer

    Methods

    | Improve this Doc View Source

    Delete(TId)

    Declaration
    public virtual bool Delete(TId id)
    Parameters
    Type Name Description
    TId id
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Delete(TModel)

    Declaration
    public virtual bool Delete(TModel obj)
    Parameters
    Type Name Description
    TModel obj
    Returns
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Get(TId)

    Declaration
    public virtual TModel Get(TId id)
    Parameters
    Type Name Description
    TId id
    Returns
    Type Description
    TModel
    | Improve this Doc View Source

    GetAll()

    Declaration
    public virtual IEnumerable<TModel> GetAll()
    Returns
    Type Description
    System.Collections.Generic.IEnumerable<TModel>
    | Improve this Doc View Source

    Save(TModel)

    Declaration
    public virtual bool Save(TModel obj)
    Parameters
    Type Name Description
    TModel obj
    Returns
    Type Description
    System.Boolean

    Implements

    IRepositoryBase<TId, TModel>
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2018 SIMPLIC GmbH
    Generated by DocFx