Show / Hide Table of Contents

    Class TableInfo

    Class, which represent information about table from database

    Inheritance
    System.Object
    TableInfo
    Namespace: Kros.KORM.Metadata
    Assembly: Kros.KORM.dll
    Syntax
    public class TableInfo

    Constructors

    TableInfo(IEnumerable<ColumnInfo>, IEnumerable<PropertyInfo>, MethodInfo)

    Initializes a new instance of the TableInfo class.

    Declaration
    public TableInfo(IEnumerable<ColumnInfo> columns, IEnumerable<PropertyInfo> allModelProperties, MethodInfo onAfterMaterialize)
    Parameters
    Type Name Description
    System.Collections.Generic.IEnumerable<ColumnInfo> columns

    The columns.

    System.Collections.Generic.IEnumerable<System.Reflection.PropertyInfo> allModelProperties

    All model properties

    System.Reflection.MethodInfo onAfterMaterialize

    Method info accessor for calling OnAfterMaterialize over IMaterializeIMaterialize If Model doesn't implement IMaterialize then null.

    Exceptions
    Type Condition
    System.ArgumentNullException

    When columns is null.

    Properties

    AllModelProperties

    All model properties.

    Declaration
    public IEnumerable<PropertyInfo> AllModelProperties { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<System.Reflection.PropertyInfo>

    Columns

    Gets the columns.

    Declaration
    public IEnumerable<ColumnInfo> Columns { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<ColumnInfo>

    The columns.

    Name

    Gets or sets the table name.

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    System.String

    OnAfterMaterialize

    Method info accessor for calling OnAfterMaterialize over IMaterializeIMaterialize If Model doesn't implement IMaterialize then null.

    Declaration
    public MethodInfo OnAfterMaterialize { get; }
    Property Value
    Type Description
    System.Reflection.MethodInfo

    PrimaryKey

    Gets the columns, which are part of primary key.

    Declaration
    public IEnumerable<ColumnInfo> PrimaryKey { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<ColumnInfo>

    Methods

    GetColumnInfo(PropertyInfo)

    Gets the column information.

    Declaration
    public ColumnInfo GetColumnInfo(PropertyInfo property)
    Parameters
    Type Name Description
    System.Reflection.PropertyInfo property

    Property Info.

    Returns
    Type Description
    ColumnInfo

    Column information.

    Exceptions
    Type Condition
    System.ArgumentNullException

    When property is null.

    GetColumnInfo(String)

    Gets the column information.

    Declaration
    public ColumnInfo GetColumnInfo(string columnName)
    Parameters
    Type Name Description
    System.String columnName

    Name of the column.

    Returns
    Type Description
    ColumnInfo

    Column information.

    Exceptions
    Type Condition
    System.ArgumentNullException

    When columnName is null.

    GetColumnInfoByPropertyName(String)

    Gets the name of the column information by property.

    Declaration
    public ColumnInfo GetColumnInfoByPropertyName(string propertyName)
    Parameters
    Type Name Description
    System.String propertyName

    Name of the property.

    Returns
    Type Description
    ColumnInfo
    Back to top KROS a.s.