Skip to content

Commit e2923c3

Browse files
authored
add new constructor with parameters (#787)
1 parent 869e9a5 commit e2923c3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/SqlAttribute.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,14 @@ public SqlAttribute(string commandText, string connectionStringSetting, CommandT
3838
/// <param name="connectionStringSetting">The name of the app setting where the SQL connection string is stored</param>
3939
public SqlAttribute(string commandText, string connectionStringSetting) : this(commandText, connectionStringSetting, CommandType.Text, null) { }
4040

41+
/// <summary>
42+
/// Initializes a new instance of the <see cref="SqlAttribute"/> class with the default value for the CommandType.
43+
/// </summary>
44+
/// <param name="commandText">For an input binding, either a SQL query or stored procedure that will be run in the database. For an output binding, the table name to upsert the values to.</param>
45+
/// <param name="connectionStringSetting">The name of the app setting where the SQL connection string is stored</param>
46+
/// <param name="parameters">Specifies the parameters that will be used to execute the SQL query or stored procedure. See <see cref="Parameters"/> for more details.</param>
47+
public SqlAttribute(string commandText, string connectionStringSetting, string parameters) : this(commandText, connectionStringSetting, CommandType.Text, parameters) { }
48+
4149
/// <summary>
4250
/// The name of the app setting where the SQL connection string is stored
4351
/// (see https://docs.microsoft.com/dotnet/api/microsoft.data.sqlclient.sqlconnection).

0 commit comments

Comments
 (0)