C# Класс SqlCommandExt, code

Показать файл Открыть проект

Открытые методы

Метод Описание
AddArrayParameters ( SqlCommand, cmd, string paramNameRoot, IEnumerable, values, SqlDbType? dbType = null, int? size = null ) : SqlParameter[],

This will add an array of parameters to a SqlCommand. This is used for an IN statement. Use the returned value for the IN part of your SQL call. (i.e. SELECT * FROM table WHERE field IN ({paramNameRoot}))

Описание методов

AddArrayParameters() публичный статический Метод

This will add an array of parameters to a SqlCommand. This is used for an IN statement. Use the returned value for the IN part of your SQL call. (i.e. SELECT * FROM table WHERE field IN ({paramNameRoot}))
public static AddArrayParameters ( SqlCommand, cmd, string paramNameRoot, IEnumerable, values, SqlDbType? dbType = null, int? size = null ) : SqlParameter[],
cmd SqlCommand, The SqlCommand object to add parameters to.
paramNameRoot string What the parameter should be named followed by a unique value for each value. This value surrounded by {} in the CommandText will be replaced.
values IEnumerable, The array of strings that need to be added as parameters.
dbType SqlDbType? One of the System.Data.SqlDbType values. If null, determines type based on T.
size int? The maximum size, in bytes, of the data within the column. The default value is inferred from the parameter value.
Результат SqlParameter[],