Class AdoNetExtensions
Inheritance
System.Object
AdoNetExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Assembly: FreeSql.dll
Syntax
public static class AdoNetExtensions
Methods
|
Improve this Doc
View Source
Delete<T1>(IDbConnection)
Declaration
public static IDelete<T1> Delete<T1>(this IDbConnection that)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbConnection |
that |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Delete<T1>(IDbConnection, Object)
删除数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
Declaration
public static IDelete<T1> Delete<T1>(this IDbConnection that, object dywhere)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbConnection |
that |
|
System.Object |
dywhere |
主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
|
Returns
Type Parameters
|
Improve this Doc
View Source
Delete<T1>(IDbTransaction)
Declaration
public static IDelete<T1> Delete<T1>(this IDbTransaction that)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbTransaction |
that |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Delete<T1>(IDbTransaction, Object)
删除数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
Declaration
public static IDelete<T1> Delete<T1>(this IDbTransaction that, object dywhere)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbTransaction |
that |
|
System.Object |
dywhere |
主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
|
Returns
Type Parameters
|
Improve this Doc
View Source
GetIFreeSql(IDbConnection)
获取 IDbConnection 对应的 IFreeSql 实例
Declaration
public static IFreeSql GetIFreeSql(this IDbConnection that)
Parameters
Type |
Name |
Description |
System.Data.IDbConnection |
that |
|
Returns
Type |
Description |
IFreeSql |
|
|
Improve this Doc
View Source
Insert<T1>(IDbConnection)
Declaration
public static IInsert<T1> Insert<T1>(this IDbConnection that)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbConnection |
that |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Insert<T1>(IDbConnection, T1)
Declaration
public static IInsert<T1> Insert<T1>(this IDbConnection that, T1 source)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbConnection |
that |
|
T1 |
source |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Insert<T1>(IDbConnection, T1[])
Declaration
public static IInsert<T1> Insert<T1>(this IDbConnection that, T1[] source)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbConnection |
that |
|
T1[] |
source |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Insert<T1>(IDbConnection, IEnumerable<T1>)
Declaration
public static IInsert<T1> Insert<T1>(this IDbConnection that, IEnumerable<T1> source)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbConnection |
that |
|
System.Collections.Generic.IEnumerable<T1> |
source |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Insert<T1>(IDbConnection, List<T1>)
Declaration
public static IInsert<T1> Insert<T1>(this IDbConnection that, List<T1> source)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbConnection |
that |
|
System.Collections.Generic.List<T1> |
source |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Insert<T1>(IDbTransaction)
Declaration
public static IInsert<T1> Insert<T1>(this IDbTransaction that)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbTransaction |
that |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Insert<T1>(IDbTransaction, T1)
Declaration
public static IInsert<T1> Insert<T1>(this IDbTransaction that, T1 source)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbTransaction |
that |
|
T1 |
source |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Insert<T1>(IDbTransaction, T1[])
Declaration
public static IInsert<T1> Insert<T1>(this IDbTransaction that, T1[] source)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbTransaction |
that |
|
T1[] |
source |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Insert<T1>(IDbTransaction, IEnumerable<T1>)
Declaration
public static IInsert<T1> Insert<T1>(this IDbTransaction that, IEnumerable<T1> source)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbTransaction |
that |
|
System.Collections.Generic.IEnumerable<T1> |
source |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Insert<T1>(IDbTransaction, List<T1>)
Declaration
public static IInsert<T1> Insert<T1>(this IDbTransaction that, List<T1> source)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbTransaction |
that |
|
System.Collections.Generic.List<T1> |
source |
|
Returns
Type Parameters
|
Improve this Doc
View Source
InsertOrUpdate<T1>(IDbConnection)
插入或更新数据,此功能依赖数据库特性(低版本可能不支持),参考如下:
MySql 5.6+: on duplicate key update
PostgreSQL 9.4+: on conflict do update
SqlServer 2008+: merge into
Oracle 11+: merge into
Sqlite: replace into
Firebird: merge into
达梦: merge into
人大金仓:on conflict do update
神通:merge into
MsAccess:不支持
注意区别:FreeSql.Repository 仓储也有 InsertOrUpdate 方法(不依赖数据库特性)
Declaration
public static IInsertOrUpdate<T1> InsertOrUpdate<T1>(this IDbConnection that)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbConnection |
that |
|
Returns
Type Parameters
|
Improve this Doc
View Source
InsertOrUpdate<T1>(IDbTransaction)
插入或更新数据,此功能依赖数据库特性(低版本可能不支持),参考如下:
MySql 5.6+: on duplicate key update
PostgreSQL 9.4+: on conflict do update
SqlServer 2008+: merge into
Oracle 11+: merge into
Sqlite: replace into
达梦: merge into
人大金仓:on conflict do update
神通:merge into
MsAccess:不支持
注意区别:FreeSql.Repository 仓储也有 InsertOrUpdate 方法(不依赖数据库特性)
Declaration
public static IInsertOrUpdate<T1> InsertOrUpdate<T1>(this IDbTransaction that)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbTransaction |
that |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Select<T1>(IDbConnection)
Declaration
public static ISelect<T1> Select<T1>(this IDbConnection that)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbConnection |
that |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Select<T1>(IDbConnection, Object)
查询数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
Declaration
public static ISelect<T1> Select<T1>(this IDbConnection that, object dywhere)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbConnection |
that |
|
System.Object |
dywhere |
主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
|
Returns
Type Parameters
|
Improve this Doc
View Source
Select<T1>(IDbTransaction)
Declaration
public static ISelect<T1> Select<T1>(this IDbTransaction that)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbTransaction |
that |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Select<T1>(IDbTransaction, Object)
查询数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
Declaration
public static ISelect<T1> Select<T1>(this IDbTransaction that, object dywhere)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbTransaction |
that |
|
System.Object |
dywhere |
主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
|
Returns
Type Parameters
|
Improve this Doc
View Source
Select<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(IDbConnection)
Declaration
public static ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Select<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(this IDbConnection that)
where T1 : class where T2 : class where T3 : class where T4 : class where T5 : class where T6 : class where T7 : class where T8 : class where T9 : class where T10 : class
Parameters
Type |
Name |
Description |
System.Data.IDbConnection |
that |
|
Returns
Type |
Description |
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> |
|
Type Parameters
Name |
Description |
T1 |
|
T2 |
|
T3 |
|
T4 |
|
T5 |
|
T6 |
|
T7 |
|
T8 |
|
T9 |
|
T10 |
|
|
Improve this Doc
View Source
Select<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(IDbTransaction)
Declaration
public static ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Select<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>(this IDbTransaction that)
where T1 : class where T2 : class where T3 : class where T4 : class where T5 : class where T6 : class where T7 : class where T8 : class where T9 : class where T10 : class
Parameters
Type |
Name |
Description |
System.Data.IDbTransaction |
that |
|
Returns
Type |
Description |
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> |
|
Type Parameters
Name |
Description |
T1 |
|
T2 |
|
T3 |
|
T4 |
|
T5 |
|
T6 |
|
T7 |
|
T8 |
|
T9 |
|
T10 |
|
|
Improve this Doc
View Source
Select<T1, T2>(IDbConnection)
Declaration
public static ISelect<T1, T2> Select<T1, T2>(this IDbConnection that)
where T1 : class where T2 : class
Parameters
Type |
Name |
Description |
System.Data.IDbConnection |
that |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Select<T1, T2>(IDbTransaction)
Declaration
public static ISelect<T1, T2> Select<T1, T2>(this IDbTransaction that)
where T1 : class where T2 : class
Parameters
Type |
Name |
Description |
System.Data.IDbTransaction |
that |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Select<T1, T2, T3>(IDbConnection)
Declaration
public static ISelect<T1, T2, T3> Select<T1, T2, T3>(this IDbConnection that)
where T1 : class where T2 : class where T3 : class
Parameters
Type |
Name |
Description |
System.Data.IDbConnection |
that |
|
Returns
Type |
Description |
ISelect<T1, T2, T3> |
|
Type Parameters
Name |
Description |
T1 |
|
T2 |
|
T3 |
|
|
Improve this Doc
View Source
Select<T1, T2, T3>(IDbTransaction)
Declaration
public static ISelect<T1, T2, T3> Select<T1, T2, T3>(this IDbTransaction that)
where T1 : class where T2 : class where T3 : class
Parameters
Type |
Name |
Description |
System.Data.IDbTransaction |
that |
|
Returns
Type |
Description |
ISelect<T1, T2, T3> |
|
Type Parameters
Name |
Description |
T1 |
|
T2 |
|
T3 |
|
|
Improve this Doc
View Source
Select<T1, T2, T3, T4>(IDbConnection)
Declaration
public static ISelect<T1, T2, T3, T4> Select<T1, T2, T3, T4>(this IDbConnection that)
where T1 : class where T2 : class where T3 : class where T4 : class
Parameters
Type |
Name |
Description |
System.Data.IDbConnection |
that |
|
Returns
Type |
Description |
ISelect<T1, T2, T3, T4> |
|
Type Parameters
Name |
Description |
T1 |
|
T2 |
|
T3 |
|
T4 |
|
|
Improve this Doc
View Source
Select<T1, T2, T3, T4>(IDbTransaction)
Declaration
public static ISelect<T1, T2, T3, T4> Select<T1, T2, T3, T4>(this IDbTransaction that)
where T1 : class where T2 : class where T3 : class where T4 : class
Parameters
Type |
Name |
Description |
System.Data.IDbTransaction |
that |
|
Returns
Type |
Description |
ISelect<T1, T2, T3, T4> |
|
Type Parameters
Name |
Description |
T1 |
|
T2 |
|
T3 |
|
T4 |
|
|
Improve this Doc
View Source
Select<T1, T2, T3, T4, T5>(IDbConnection)
Declaration
public static ISelect<T1, T2, T3, T4, T5> Select<T1, T2, T3, T4, T5>(this IDbConnection that)
where T1 : class where T2 : class where T3 : class where T4 : class where T5 : class
Parameters
Type |
Name |
Description |
System.Data.IDbConnection |
that |
|
Returns
Type |
Description |
ISelect<T1, T2, T3, T4, T5> |
|
Type Parameters
Name |
Description |
T1 |
|
T2 |
|
T3 |
|
T4 |
|
T5 |
|
|
Improve this Doc
View Source
Select<T1, T2, T3, T4, T5>(IDbTransaction)
Declaration
public static ISelect<T1, T2, T3, T4, T5> Select<T1, T2, T3, T4, T5>(this IDbTransaction that)
where T1 : class where T2 : class where T3 : class where T4 : class where T5 : class
Parameters
Type |
Name |
Description |
System.Data.IDbTransaction |
that |
|
Returns
Type |
Description |
ISelect<T1, T2, T3, T4, T5> |
|
Type Parameters
Name |
Description |
T1 |
|
T2 |
|
T3 |
|
T4 |
|
T5 |
|
|
Improve this Doc
View Source
Select<T1, T2, T3, T4, T5, T6>(IDbConnection)
Declaration
public static ISelect<T1, T2, T3, T4, T5, T6> Select<T1, T2, T3, T4, T5, T6>(this IDbConnection that)
where T1 : class where T2 : class where T3 : class where T4 : class where T5 : class where T6 : class
Parameters
Type |
Name |
Description |
System.Data.IDbConnection |
that |
|
Returns
Type |
Description |
ISelect<T1, T2, T3, T4, T5, T6> |
|
Type Parameters
Name |
Description |
T1 |
|
T2 |
|
T3 |
|
T4 |
|
T5 |
|
T6 |
|
|
Improve this Doc
View Source
Select<T1, T2, T3, T4, T5, T6>(IDbTransaction)
Declaration
public static ISelect<T1, T2, T3, T4, T5, T6> Select<T1, T2, T3, T4, T5, T6>(this IDbTransaction that)
where T1 : class where T2 : class where T3 : class where T4 : class where T5 : class where T6 : class
Parameters
Type |
Name |
Description |
System.Data.IDbTransaction |
that |
|
Returns
Type |
Description |
ISelect<T1, T2, T3, T4, T5, T6> |
|
Type Parameters
Name |
Description |
T1 |
|
T2 |
|
T3 |
|
T4 |
|
T5 |
|
T6 |
|
|
Improve this Doc
View Source
Select<T1, T2, T3, T4, T5, T6, T7>(IDbConnection)
Declaration
public static ISelect<T1, T2, T3, T4, T5, T6, T7> Select<T1, T2, T3, T4, T5, T6, T7>(this IDbConnection that)
where T1 : class where T2 : class where T3 : class where T4 : class where T5 : class where T6 : class where T7 : class
Parameters
Type |
Name |
Description |
System.Data.IDbConnection |
that |
|
Returns
Type |
Description |
ISelect<T1, T2, T3, T4, T5, T6, T7> |
|
Type Parameters
Name |
Description |
T1 |
|
T2 |
|
T3 |
|
T4 |
|
T5 |
|
T6 |
|
T7 |
|
|
Improve this Doc
View Source
Select<T1, T2, T3, T4, T5, T6, T7>(IDbTransaction)
Declaration
public static ISelect<T1, T2, T3, T4, T5, T6, T7> Select<T1, T2, T3, T4, T5, T6, T7>(this IDbTransaction that)
where T1 : class where T2 : class where T3 : class where T4 : class where T5 : class where T6 : class where T7 : class
Parameters
Type |
Name |
Description |
System.Data.IDbTransaction |
that |
|
Returns
Type |
Description |
ISelect<T1, T2, T3, T4, T5, T6, T7> |
|
Type Parameters
Name |
Description |
T1 |
|
T2 |
|
T3 |
|
T4 |
|
T5 |
|
T6 |
|
T7 |
|
|
Improve this Doc
View Source
Select<T1, T2, T3, T4, T5, T6, T7, T8>(IDbConnection)
Declaration
public static ISelect<T1, T2, T3, T4, T5, T6, T7, T8> Select<T1, T2, T3, T4, T5, T6, T7, T8>(this IDbConnection that)
where T1 : class where T2 : class where T3 : class where T4 : class where T5 : class where T6 : class where T7 : class where T8 : class
Parameters
Type |
Name |
Description |
System.Data.IDbConnection |
that |
|
Returns
Type |
Description |
ISelect<T1, T2, T3, T4, T5, T6, T7, T8> |
|
Type Parameters
Name |
Description |
T1 |
|
T2 |
|
T3 |
|
T4 |
|
T5 |
|
T6 |
|
T7 |
|
T8 |
|
|
Improve this Doc
View Source
Select<T1, T2, T3, T4, T5, T6, T7, T8>(IDbTransaction)
Declaration
public static ISelect<T1, T2, T3, T4, T5, T6, T7, T8> Select<T1, T2, T3, T4, T5, T6, T7, T8>(this IDbTransaction that)
where T1 : class where T2 : class where T3 : class where T4 : class where T5 : class where T6 : class where T7 : class where T8 : class
Parameters
Type |
Name |
Description |
System.Data.IDbTransaction |
that |
|
Returns
Type |
Description |
ISelect<T1, T2, T3, T4, T5, T6, T7, T8> |
|
Type Parameters
Name |
Description |
T1 |
|
T2 |
|
T3 |
|
T4 |
|
T5 |
|
T6 |
|
T7 |
|
T8 |
|
|
Improve this Doc
View Source
Select<T1, T2, T3, T4, T5, T6, T7, T8, T9>(IDbConnection)
Declaration
public static ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9> Select<T1, T2, T3, T4, T5, T6, T7, T8, T9>(this IDbConnection that)
where T1 : class where T2 : class where T3 : class where T4 : class where T5 : class where T6 : class where T7 : class where T8 : class where T9 : class
Parameters
Type |
Name |
Description |
System.Data.IDbConnection |
that |
|
Returns
Type |
Description |
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9> |
|
Type Parameters
Name |
Description |
T1 |
|
T2 |
|
T3 |
|
T4 |
|
T5 |
|
T6 |
|
T7 |
|
T8 |
|
T9 |
|
|
Improve this Doc
View Source
Select<T1, T2, T3, T4, T5, T6, T7, T8, T9>(IDbTransaction)
Declaration
public static ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9> Select<T1, T2, T3, T4, T5, T6, T7, T8, T9>(this IDbTransaction that)
where T1 : class where T2 : class where T3 : class where T4 : class where T5 : class where T6 : class where T7 : class where T8 : class where T9 : class
Parameters
Type |
Name |
Description |
System.Data.IDbTransaction |
that |
|
Returns
Type |
Description |
ISelect<T1, T2, T3, T4, T5, T6, T7, T8, T9> |
|
Type Parameters
Name |
Description |
T1 |
|
T2 |
|
T3 |
|
T4 |
|
T5 |
|
T6 |
|
T7 |
|
T8 |
|
T9 |
|
|
Improve this Doc
View Source
Update<T1>(IDbConnection)
Declaration
public static IUpdate<T1> Update<T1>(this IDbConnection that)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbConnection |
that |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Update<T1>(IDbConnection, Object)
修改数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
Declaration
public static IUpdate<T1> Update<T1>(this IDbConnection that, object dywhere)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbConnection |
that |
|
System.Object |
dywhere |
主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
|
Returns
Type Parameters
|
Improve this Doc
View Source
Update<T1>(IDbTransaction)
Declaration
public static IUpdate<T1> Update<T1>(this IDbTransaction that)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbTransaction |
that |
|
Returns
Type Parameters
|
Improve this Doc
View Source
Update<T1>(IDbTransaction, Object)
修改数据,传入动态条件,如:主键值 | new[]{主键值1,主键值2} | TEntity1 | new[]{TEntity1,TEntity2} | new{id=1}
Declaration
public static IUpdate<T1> Update<T1>(this IDbTransaction that, object dywhere)
where T1 : class
Parameters
Type |
Name |
Description |
System.Data.IDbTransaction |
that |
|
System.Object |
dywhere |
主键值、主键值集合、实体、实体集合、匿名对象、匿名对象集合
|
Returns
Type Parameters