Skip to content

Commit

Permalink
Fixed typo.
Browse files Browse the repository at this point in the history
  • Loading branch information
open-collar committed Sep 1, 2021
1 parent 8909c26 commit 228e83b
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/OpenCollar.Extensions.SqlClient/ConnectionProxyExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ namespace OpenCollar.Extensions.SqlClient
public static class ConnectionProxyExtensions
{
/// <summary>
/// Creates a new execution context builder, specifying that the SQL supplied that will be executed on the
/// connection provided.
/// Creates a new execution context builder, specifying that the stored procedure named will be executed on
/// the connection provided.
/// </summary>
/// <param name="connection">
/// The connection on which the command will be executed.
/// </param>
/// <param name="sql">
/// The SQL to execute.
/// <param name="storedProcedure">
/// The name of the stored procedure to execute.
/// </param>
/// <returns>
/// A <see cref="QueryBuilder"> builder </see> that can be called with further extensions to register
Expand All @@ -46,28 +46,25 @@ public static class ConnectionProxyExtensions
/// <paramref name="connection" /> is <see langword="null" />.
/// </exception>
/// <exception cref="System.ArgumentNullException">
/// <paramref name="sql" /> is <see langword="null" />.
/// </exception>
/// <exception cref="System.ArgumentException">
/// <paramref name="sql" /> is zero-length or contains only white-space characters.
/// <paramref name="storedProcedure" /> is <see langword="null" />.
/// </exception>
public static QueryBuilder QuerSql(this ConnectionProxy connection, string sql)
public static QueryBuilder QueryProcedure(this ConnectionProxy connection, Model.Identifier storedProcedure)
{
connection.Validate(nameof(connection), ObjectIs.NotNull);
sql.Validate(nameof(sql), StringIs.NotNullEmptyOrWhiteSpace);
storedProcedure.Validate(nameof(storedProcedure), ObjectIs.NotNull);

return new QueryBuilder(connection, CommandType.Text, sql);
return new QueryBuilder(connection, CommandType.StoredProcedure, storedProcedure);
}

/// <summary>
/// Creates a new execution context builder, specifying that the stored procedure named will be executed on
/// the connection provided.
/// Creates a new execution context builder, specifying that the SQL supplied that will be executed on the
/// connection provided.
/// </summary>
/// <param name="connection">
/// The connection on which the command will be executed.
/// </param>
/// <param name="storedProcedure">
/// The name of the stored procedure to execute.
/// <param name="sql">
/// The SQL to execute.
/// </param>
/// <returns>
/// A <see cref="QueryBuilder"> builder </see> that can be called with further extensions to register
Expand All @@ -77,14 +74,17 @@ public static QueryBuilder QuerSql(this ConnectionProxy connection, string sql)
/// <paramref name="connection" /> is <see langword="null" />.
/// </exception>
/// <exception cref="System.ArgumentNullException">
/// <paramref name="storedProcedure" /> is <see langword="null" />.
/// <paramref name="sql" /> is <see langword="null" />.
/// </exception>
public static QueryBuilder QueryProcedure(this ConnectionProxy connection, Model.Identifier storedProcedure)
/// <exception cref="System.ArgumentException">
/// <paramref name="sql" /> is zero-length or contains only white-space characters.
/// </exception>
public static QueryBuilder QuerySql(this ConnectionProxy connection, string sql)
{
connection.Validate(nameof(connection), ObjectIs.NotNull);
storedProcedure.Validate(nameof(storedProcedure), ObjectIs.NotNull);
sql.Validate(nameof(sql), StringIs.NotNullEmptyOrWhiteSpace);

return new QueryBuilder(connection, CommandType.StoredProcedure, storedProcedure);
return new QueryBuilder(connection, CommandType.Text, sql);
}
}
}

0 comments on commit 228e83b

Please sign in to comment.