private static SqlParameter CreateParameter(string name, DvlSqlType type) { var param = new SqlParameter(name.GetStringAfter("."), type.SqlDbType) { Value = DBNull.Value, Direction = ParameterDirection.Output }; if (type.Size != null) { param.Size = type.Size.Value; } if (type.Precision != null) { param.Precision = type.Precision.Value; } if (type.Scale != null) { param.Scale = type.Scale.Value; } return(param); }
public DvlSqlParameter(string name, DvlSqlType type) : base(CreateParameter(name, type)) { if (type is DvlSqlType <TValue> dvlSqlTypeValue) { this.ExactValue = dvlSqlTypeValue.ExactValue; } }
public OutputDvlSqlParameter(string name, DvlSqlType type) : base(CreateParameter(name, type)) { }
private bool Equals(DvlSqlType other) => other.Name == this.Name && other.Precision == this.Precision && other.Scale == this.Scale && other.Size == this.Size && other.SqlDbType == this.SqlDbType;