public override void AddValue(NpgsqlCommand command) { if (_value == null) { command.AddParam(VariableName, DBNull.Value); } else { command.AddParam(VariableName, _value.Id.Value); } }
public override void AddValue(NpgsqlCommand command) { if (_value.HasValue) { command.AddParam(VariableName, (int)(object)_value); } else { command.AddParam(VariableName, DBNull.Value); } }
public NpgsqlCommand BuildCommand(string sql, object[] args) { var cmd = new NpgsqlCommand(sql); if (args == null) { return(cmd); } foreach (var arg in args) { cmd.AddParam(arg); } return(cmd); }
public override void AddValue(NpgsqlCommand command) { command.AddParam(VariableName, _value.ToJson().ToString()); }
public override void AddValue(NpgsqlCommand command) { command.AddParam(VariableName, (int)(object)_value); }
public override void AddValue(NpgsqlCommand command) { var array = new JArray(_value.ToArray()); command.AddParam(VariableName, array.ToString()); }