Class NpgsqlCommandExtensions
Provides a set of useful extension methods for the
Namespace: Venflow
Assembly: Venflow.dll
Syntax
public static class NpgsqlCommandExtensions : object
Methods
| Improve this Doc View SourceAddParamter<TType>(NpgsqlCommand, String, TType)
Adds a new Parameter to the
Declaration
public static NpgsqlParameter<TType> AddParamter<TType>(this NpgsqlCommand command, string parameterName, TType value)
Parameters
| Type | Name | Description |
|---|---|---|
| NpgsqlCommand | command | The command to which the Parameter should be added. |
| String | parameterName | The name of the Parameter. |
| TType | value | The value of the Parameter. |
Returns
| Type | Description |
|---|---|
| NpgsqlParameter<TType> | the just created |
Type Parameters
| Name | Description |
|---|---|
| TType | The value type of the Parameter. |
SetInterpolatedCommandText(NpgsqlCommand, FormattableString)
Sets the command text of the used
Declaration
public static void SetInterpolatedCommandText(this NpgsqlCommand command, FormattableString sql)
Parameters
| Type | Name | Description |
|---|---|---|
| NpgsqlCommand | command | The command of which the command text should be set. Ensure that you do not pass any user manipulated SQL for this parameter. You should only add parameters trough string interpolation. |
| FormattableString | sql | A string containing the SQL statement. |