Show / Hide Table of Contents

# Class DbConnectionCurdExtension

##### Inheritance

System.Object
DbConnectionCurdExtension

##### 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

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

##### Syntax

    public static class DbConnectionCurdExtension

### Methods

#### Add<T>(IDbConnection, T)

向数据库中增加实例

##### Declaration

    public static int Add<T>(this IDbConnection connection, T instance)

##### Parameters

Type | Name | Description
--- | --- | ---
IDbConnection | connection | 对IDbConnection扩展
T | instance | 实例

##### Returns

Type | Description
--- | ---
System.Int32 | 影响行数

##### Type Parameters

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

#### Delete<T>(IDbConnection, T)

删除数据库中实例

##### Declaration

    public static int Delete<T>(this IDbConnection connection, T instance)

##### Parameters

Type | Name | Description
--- | --- | ---
IDbConnection | connection | 对IDbConnection扩展
T | instance | 实例

##### Returns

Type | Description
--- | ---
System.Int32 | 影响行数

##### Type Parameters

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

#### Get<T>(IDbConnection)

获取当前实例集合

##### Declaration

    public static IEnumerable<T> Get<T>(this IDbConnection connection)

##### Parameters

Type | Name | Description
--- | --- | ---
IDbConnection | connection | 对IDbConnection扩展

##### Returns

Type | Description
--- | ---
System.Collections.Generic.IEnumerable<T> | 结果集

##### Type Parameters

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

#### Modify<T>(IDbConnection, T)

修改数据库中实例

##### Declaration

    public static int Modify<T>(this IDbConnection connection, T instance)

##### Parameters

Type | Name | Description
--- | --- | ---
IDbConnection | connection | 对IDbConnection扩展
T | instance | 实例

##### Returns

Type | Description
--- | ---
System.Int32 | 影响行数

##### Type Parameters

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