Show / Hide Table of Contents

# Class SqlDynamicCache

##### Inheritance

System.Object
SqlDynamicCache

##### 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: Mellivora.DynamicCache

###### Assembly: cs.temp.dll.dll

##### Syntax

    public static class SqlDynamicCache

### Methods

#### GetCommandGenericDelegate<T>(String, T)

获取根据返回类型构建Command的动态缓存方法

##### Declaration

    [SecurityCritical]
    public static SqlDelegate<T>.GetGenericCommand GetCommandGenericDelegate<T>(string sql, T value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | sql | SQL语句
T | value | 实例

##### Returns

Type | Description
--- | ---
SqlDelegate.GetGenericCommand<> | 动态缓存方法

##### Type Parameters

Name | Description
--- | ---
T | 函数返回类型

#### GetInstanceCommandDelegate<T>(String, Object)

获取通过实例构建Command的动态缓存方法

##### Declaration

    [SecurityCritical]
    public static SqlDelegate<T>.GetCommandByInstance GetInstanceCommandDelegate<T>(string sql, object value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | sql | SQL语句
System.Object | value | 实例

##### Returns

Type | Description
--- | ---
SqlDelegate.GetCommandByInstance<> | 动态缓存方法

##### Type Parameters

Name | Description
--- | ---
T | 实例类型

#### GetObjectsCommandDelegate<T>(String, Object[])

获取通过动态对象数组构建Command的动态缓存方法

##### Declaration

    public static SqlDelegate<T>.GetCommandByObject GetObjectsCommandDelegate<T>(string sql, object[] value)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | sql | SQL语句
System.Object[] | value | 对象数组

##### Returns

Type | Description
--- | ---
SqlDelegate.GetCommandByObject<> | 动态缓存方法

##### Type Parameters

Name | Description
--- | ---
T | 返回类型

#### GetReaderDelegate<T>(IDataReader, String)

获取处理单个Reader结果的映射缓存方法

##### Declaration

    [SecurityCritical]
    public static SqlDelegate<T>.GetReaderInstance GetReaderDelegate<T>(IDataReader reader, string sql)

##### Parameters

Type | Name | Description
--- | --- | ---
IDataReader | reader | 数据库返回的DataReader
System.String | sql | SQL语句

##### Returns

Type | Description
--- | ---
SqlDelegate.GetReaderInstance<> | 动态缓存方法

##### Type Parameters

Name | Description
--- | ---
T | 返回的类型

#### GetReaderDelegate<T>(IDataReader, String, Int32, Int32)

获取复杂Reader映射缓存方法

##### Declaration

    [SecurityCritical]
    public static SqlDelegate<T>.GetReaderInstance GetReaderDelegate<T>(IDataReader reader, string sql, int firstColumn, int length)

##### Parameters

Type | Name | Description
--- | --- | ---
IDataReader | reader | 数据库返回的DataReader
System.String | sql | SQL语句
System.Int32 | firstColumn |
System.Int32 | length | 从起始列继续向后查询列的个数

##### Returns

Type | Description
--- | ---
SqlDelegate.GetReaderInstance<> | 动态缓存方法

##### Type Parameters

Name | Description
--- | ---
T | 返回的类型