 | DapperDbHelperQueryT 方法 |
Sweet 开发框架
查询数据集合
命名空间:
Sweet.DBUtility.SQLServer
程序集:
Sweet.DBUtility.SQLServer (在 Sweet.DBUtility.SQLServer.dll 中) 版本:3.10.1.0 (3.10.1.0)
语法public static IEnumerable<T> Query<T>(
string sql,
Object param = null,
IDbTransaction transaction = null,
bool buffered = true,
int? commandTimeout = null,
CommandType? commandType = null
)
Public Shared Function Query(Of T) (
sql As String,
Optional param As Object = Nothing,
Optional transaction As IDbTransaction = Nothing,
Optional buffered As Boolean = true,
Optional commandTimeout As Integer? = Nothing,
Optional commandType As CommandType? = Nothing
) As IEnumerable(Of T)
static member Query :
sql : string *
?param : Object *
?transaction : IDbTransaction *
?buffered : bool *
?commandTimeout : Nullable<int> *
?commandType : Nullable<CommandType>
(* Defaults:
let _param = defaultArg param null
let _transaction = defaultArg transaction null
let _buffered = defaultArg buffered true
let _commandTimeout = defaultArg commandTimeout null
let _commandType = defaultArg commandType null
*)
-> IEnumerable<'T>
参数
- sql
- 类型:SystemString
查询Sql语句或存储过程名称 - param (Optional)
- 类型:SystemObject
参数值(可选) - transaction (Optional)
- 类型:System.DataIDbTransaction
事务名称(可选) - buffered (Optional)
- 类型:SystemBoolean
是否将查询结果缓存到内存中(可选) - commandTimeout (Optional)
- 类型:SystemNullableInt32
超时时间(可选) - commandType (Optional)
- 类型:SystemNullableCommandType
指定如果解释sql字符串:语句/存储过程(可选)
类型参数
- T
[缺少 "M:Sweet.DBUtility.SQLServer.DapperDbHelper.Query``1(System.String,System.Object,System.Data.IDbTransaction,System.Boolean,System.Nullable{System.Int32},System.Nullable{System.Data.CommandType})" 的 <typeparam name="T"/> 文档]
返回值
类型:
IEnumerableT返回指定泛型集合
参见