Class TypedDbParamCache
Provides fixed DbType settings for a database parameter.
public class TypedDbParamCache : DbParamInfo
- Inheritance
-
TypedDbParamCache
- Inherited Members
- Extension Methods
Fields
Type
The DbType that will be used to create the parameter.
public readonly DbType Type
Field Value
Methods
Get(DbType)
Gets parameter settings for the supplied fixed size type.
public static TypedDbParamCache Get(DbType type)
Parameters
typeDbType
Returns
Get(DbType, int)
Gets parameter settings for the supplied type and optional size.
public static DbParamInfo Get(DbType type, int size = 0)
Parameters
Returns
Remove(IDbCommand, object?)
Drops the parameter reference from the command.
public override void Remove(IDbCommand cmd, object? currentValue)
Parameters
cmdIDbCommandcurrentValueobject
SaveUse(string, IDbCommand, ref object)
Binds a value and hands back the parameter reference in value, so a later
Update(IDbCommand, ref object?, object?) can change it without a lookup.
public override bool SaveUse(string paramName, IDbCommand cmd, ref object value)
Parameters
paramNamestringcmdIDbCommandvalueobject
Returns
Update(IDbCommand, ref object?, object?)
Changes an already-bound parameter's value. currentValue is the parameter reference
a previous SaveUse(string, IDbCommand, ref object) handed back.
public override bool Update(IDbCommand cmd, ref object? currentValue, object? newValue)
Parameters
cmdIDbCommandcurrentValueobjectnewValueobject
Returns
Use(string, DbCommand, object)
Binds a value to the command for a single execution.
public override bool Use(string paramName, DbCommand cmd, object value)
Parameters
Returns
Use(string, IDbCommand, object)
Binds a value for a single run, without keeping a reference for reuse.
public override bool Use(string paramName, IDbCommand cmd, object value)
Parameters
paramNamestringcmdIDbCommandvalueobject