public AddWithValue ( string parameterName, NpgsqlDbType parameterType, int size, object value ) : Npgsql.NpgsqlParameter | ||
parameterName | string | The name of the |
parameterType | NpgsqlDbType | One of the NpgsqlDbType values. |
size | int | The length of the column. |
value | object | The Value of the |
return | Npgsql.NpgsqlParameter |
/// <summary> /// Add range with value /// </summary> /// <param name="conn"></param> /// <param name="values"></param> public static void AddRangeWithValue(this NpgsqlParameterCollection conn, Dictionary <string, object> values) { conn.CheckNull(nameof(conn)); #if NETFRAMEWORK || NETSTANDARD2_0 foreach (var pair in values) { var key = pair.Key; var value = pair.Value; #else foreach (var(key, value) in values) { #endif conn.AddWithValue(key, value); } } }