Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Creates a SqlStringAccessor<TResult> for the given Transact-SQL query.
Namespace: Microsoft.Practices.EnterpriseLibrary.Data
Assembly: Microsoft.Practices.EnterpriseLibrary.Data (in Microsoft.Practices.EnterpriseLibrary.Data.dll)
Syntax
'Declaration
<ExtensionAttribute> _
Public Shared Function CreateSqlStringAccessor(Of TResult) ( _
database As Database, _
sqlString As String, _
parameterMapper As IParameterMapper, _
rowMapper As IRowMapper(Of TResult) _
) As DataAccessor(Of TResult)
public static DataAccessor<TResult> CreateSqlStringAccessor<TResult>(
this Database database,
string sqlString,
IParameterMapper parameterMapper,
IRowMapper<TResult> rowMapper
)
[ExtensionAttribute]
public:
generic<typename TResult>
static DataAccessor<TResult>^ CreateSqlStringAccessor(
Database^ database,
String^ sqlString,
IParameterMapper^ parameterMapper,
IRowMapper<TResult>^ rowMapper
)
JScript does not support generic types or methods.
Parameters
- database
Type: Microsoft.Practices.EnterpriseLibrary.Data.Database
The Database that contains the stored procedure.
- sqlString
Type: System.String
The Transact-SQL query that will be executed by the SqlStringAccessor<TResult>.
- parameterMapper
Type: Microsoft.Practices.EnterpriseLibrary.Data.IParameterMapper
The IParameterMapper that will be used to interpret the parameters passed to the Execute method.
- rowMapper
Type: Microsoft.Practices.EnterpriseLibrary.Data.IRowMapper<TResult>
The IRowMapper<TResult> that will be used to convert the returned data to clr type TResult.
Type Parameters
- TResult
The type the SprocAccessor<TResult> should return when executing.
Return Value
A new instance of SprocAccessor<TResult>.