本文整理汇总了C#中IDbConnection.CreateCommandInternal方法的典型用法代码示例。如果您正苦于以下问题:C# IDbConnection.CreateCommandInternal方法的具体用法?C# IDbConnection.CreateCommandInternal怎么用?C# IDbConnection.CreateCommandInternal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IDbConnection
的用法示例。
在下文中一共展示了IDbConnection.CreateCommandInternal方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ToCommand
/// <summary>
/// Converts the specified <see cref="SqlDelete"/> expression tree to an <see cref="IDbCommand"/>
/// instance for the specified <paramref name="connection" />.
/// </summary>
/// <param name="sql">
/// The <see cref="SqlDelete"/> to convert to an <see cref="IDbCommand"/>.
/// </param>
/// <param name="connection">
/// The <see cref="IDbConnection"/> for which to create an <see cref="IDbCommand"/>.
/// </param>
/// <returns>
/// An <see cref="IDbCommand"/> for the specified <paramref name="connection"/> that reprents
/// the specified SQL expression tree.
/// </returns>
/// <remarks>
/// Any <see cref="SqlParameter"/> members of the <see cref="SqlDelete"/> expression are
/// automatically converted to <see cref="IDbDataParameter"/> instances and attached to
/// the returned <see cref="IDbCommand"/>.
/// </remarks>
public static IDbCommand ToCommand(this SqlDelete sql, IDbConnection connection)
{
return connection.CreateCommandInternal(sql);
}