ParamValue Class
.NET Standard 2.x
Represents the value for a SQL parameter.
Once you want to execute a SQL statement and pass in the value for a SQL parameter, you can create an instance of the ParamValue
class as an argument.
Namespace: SnapObjects.Data
Assembly: SnapObjects.Data.dll
Syntax
public class ParamValue
Property
Name | Return Type | Description |
---|---|---|
DataType | Object | Gets the data type of the parameter value. |
Direction | SnapObjects.Data.ParameterDirection | Gets the direction type of the parameter. |
Name | string | Gets the name of the parameter. |
Value | object | Gets the value of the parameter. |
Method
Name | Return Type | Description |
---|---|---|
New(string name, object value) | ParamValue | Creates a new ParamValue object and specifies the name and value of the parameter. |
New<TType>(string name, TType value, ParameterDirection direction = ParameterDirection.Input) | ParamValue | Creates a new ParamValue object and specifies the name and the direction type of the parameter. |
Input<TType>(string name, TType value) | ParamValue | Creates a new ParamValue object as the input parameter of a stored procedure or function. |
Input(string name, object value, Type dataType) | ParamValue | Creates a new ParamValue object as the input parameter of a stored procedure or function. |
Output<TType>(string name) | ParamValue | Creates a new ParamValue object as the output parameter of a stored procedure. |
Output<TType>(string name, int size) | ParamValue | Creates a new ParamValue object as the output parameter of a stored procedure. |
Output(string name, Type dataType) | ParamValue | Creates a new ParamValue object as the output parameter of a stored procedure. |
Output(string name, int size, Type dataType) | ParamValue | Creates a new ParamValue object as the output parameter of a stored procedure. |
InputOutput(string name, object value, Type dataType) | ParamValue | Creates a new ParamValue object as the input and output parameter of a stored procedure. |
InputOutput<TType>(string name, TType value) | ParamValue | Creates a new ParamValue object as the input and output parameter of a stored procedure. |
ReturnValue<TType>(string name) | ParamValue | Creates a new ParamValue object as the return value of a stored procedure. |
ReturnValue(string name, Type dataType) | ParamValue | Creates a new ParamValue object as the return value of a stored procedure. |