Database::Query Method

Executes a SQL query that returns a list of rows as the result.

Namespace:  WebMatrix.Data
Assembly:  WebMatrix.Data (in WebMatrix.Data.dll)

public:
IEnumerable<Object^>^ Query(
	String^ commandText, 
	... array<Object^>^ parameters
)

Parameters

commandText
Type: System::String
The SQL query to execute.
parameters
Type: array<System::Object>
(Optional) Parameters to pass to the SQL query.

Return Value

Type: System.Collections.Generic::IEnumerable<Object>
The rows returned by the SQL query.

  • Medium trust for the immediate caller. This member can be used by partially trusted code.
Show: