Table of Contents

Class SimpleParameterInfoExtensions

Namespace
Dapper.SimpleSqlBuilder.Extensions
Assembly
Dapper.SimpleSqlBuilder.dll

An extension class for SimpleParameterInfo.

public static class SimpleParameterInfoExtensions

Inheritance

Methods

DefineParam<T>(T, DbType?, int?, byte?, byte?, bool)

An extension method to create an instance of ISimpleParameterInfo with the specified dbType, size, precision, and scale.

public static ISimpleParameterInfo DefineParam<T>(this T value, DbType? dbType = null, int? size = null, byte? precision = null, byte? scale = null, bool reuse = true)

Parameters

value T

The parameter value.

dbType DbType?

The parameter DbType.

size int?

The parameter size.

precision byte?

The parameter precision.

scale byte?

The parameter scale.

reuse bool

true to reuse this parameter for every use within the builder; false to create a separate parameter for each use. The default is true.

This setting affects only this parameter. The builder's reuseParameters option continues to govern interpolated values.

Returns

ISimpleParameterInfo

An new instance of ISimpleParameterInfo.

Type Parameters

T

The type of the parameter.

Exceptions

ArgumentException

Thrown when called on ISimpleParameterInfo.