Interface IDbParamInfoGetter
Reads a provider's real parameter metadata, its exact types and sizes, off a command, so a query binds parameters the way the database expects rather than inferring from the values. Register one for your provider in ParamGetterMakers, and the command uses it while learning its cache.
public interface IDbParamInfoGetter
- Extension Methods
Fields
ParamGetterMakers
The registered metadata readers, tried in turn against a command until one claims it. Add your provider's reader here to pin parameter types across the app.
public static readonly List<ParamInfoGetterMaker> ParamGetterMakers
Field Value
Methods
EnumerateParameters()
The command's parameters, as name and position pairs, for learning them all in one pass.
IEnumerable<KeyValuePair<string, int>> EnumerateParameters()
Returns
MakeInfoAt(int)
The binding metadata for the parameter at position i.
DbParamInfo MakeInfoAt(int i)
Parameters
iint
Returns
TryGetInfo(string, out DbParamInfo)
The metadata for one named parameter, from the provider's schema when it has it.
bool TryGetInfo(string paramName, out DbParamInfo info)
Parameters
paramNamestringinfoDbParamInfo
Returns
TryGetParamInfo(IDbCommand, string, out DbParamInfo)
Reads the metadata for one named parameter off cmd, through a registered reader when one claims the command, otherwise from the parameter as-is.
public static bool TryGetParamInfo(IDbCommand cmd, string paramName, out DbParamInfo param)
Parameters
cmdIDbCommandparamNamestringparamDbParamInfo