Show / Hide Table of Contents

    Class DynamicMethodModelFactory

    Modelfactory, which materialize model by dynamic method delegates.

    Inheritance
    System.Object
    DynamicMethodModelFactory
    Implements
    IModelFactory
    Namespace: Kros.KORM.Materializer
    Assembly: Kros.KORM.dll
    Syntax
    public class DynamicMethodModelFactory : IModelFactory

    Constructors

    DynamicMethodModelFactory(IDatabaseMapper)

    Initializes a new instance of the DynamicMethodModelFactory class.

    Declaration
    public DynamicMethodModelFactory(IDatabaseMapper databaseMapper)
    Parameters
    Type Name Description
    IDatabaseMapper databaseMapper

    The database mapper.

    Exceptions
    Type Condition
    System.ArgumentNullException

    databaseMapper;Argument 'databaseMapper' is required.

    Methods

    GetFactory<T>(IDataReader)

    Gets the factory for creating and filling model.

    Declaration
    public Func<IDataReader, T> GetFactory<T>(IDataReader reader)
    Parameters
    Type Name Description
    System.Data.IDataReader reader

    Reader from fill model.

    Returns
    Type Description
    System.Func<System.Data.IDataReader, T>

    Factory for creating and filling model.

    Type Parameters
    Name Description
    T

    Type of model class.

    Exceptions
    Type Condition
    System.ArgumentNullException

    reader;Argument 'reader' is required.

    Implements

    IModelFactory

    See Also

    IModelFactory
    Back to top KROS a.s.