ISqlConnection.Query<T>(String, Object[]) 方法

定义

从存储中查询数据结构语句

public:
generic <typename T>
 where T : gcnew() System::Collections::Generic::IList<T> ^ Query(System::String ^ query, ... cli::array <System::Object ^> ^ args);
public System.Collections.Generic.IList<T> Query<T> (string query, params object[] args) where T : new();
abstract member Query : string * obj[] -> System.Collections.Generic.IList<'T (requires 'T : (new : unit -> 'T))> (requires 'T : (new : unit -> 'T))
Public Function Query(Of T As New) (query As String, ParamArray args As Object()) As IList(Of T)

类型参数

T

用于映射我们预期结果的类型

参数

query
String

数据结构语句

args
Object[]

替换参数列表

返回

IList<T>

列出结果

适用于