本文整理匯總了C#中NHibernate.Engine.QueryParameters.BindParameters方法的典型用法代碼示例。如果您正苦於以下問題:C# QueryParameters.BindParameters方法的具體用法?C# QueryParameters.BindParameters怎麽用?C# QueryParameters.BindParameters使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類NHibernate.Engine.QueryParameters
的用法示例。
在下文中一共展示了QueryParameters.BindParameters方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: BindParameterValues
/// <summary>
/// Bind all parameter values into the prepared statement in preparation for execution.
/// </summary>
/// <param name="statement">The ADO prepared statement </param>
/// <param name="queryParameters">The encapsulation of the parameter values to be bound. </param>
/// <param name="startIndex">The position from which to start binding parameter values. </param>
/// <param name="session">The originating session. </param>
/// <returns> The number of ADO bind positions actually bound during this method execution. </returns>
protected virtual int BindParameterValues(IDbCommand statement, QueryParameters queryParameters,
int startIndex, ISessionImplementor session)
{
// NH Different behavior:
// The responsibility of parameter binding was entirely moved to QueryParameters
// to deal with positionslParameter+NamedParameter+ParameterOfFilters
return queryParameters.BindParameters(statement, startIndex, session);
}
示例2: BindQueryParameters
protected virtual int BindQueryParameters(IDbCommand command, QueryParameters parameter, int colIndex)
{
colIndex += parameter.BindParameters(command, colIndex, session);
return colIndex;
}