private void PrepareStatement(ISqlExpression query, IDbCommand command) { foreach (var namedParam in query.GetNamedParams()) { var parameter = command.CreateParameter(); parameter.Value = namedParam.Value ?? DBNull.Value; parameter.DbType = namedParam.DbType; parameter.ParameterName = namedParam.Alias; command.Parameters.Add(parameter); } }
public IEnumerable <NamedParameter> GetNamedParams() { return(_left.GetNamedParams().Concat(_right.GetNamedParams())); }
public IEnumerable <NamedParameter> GetNamedParams() { return(_inner.GetNamedParams()); }