示例#1
0
        private DbParameter CreateDbParameter(DbCommand cmd, ParameterClause param)
        {
            DbParameter sqlParam = cmd.CreateParameter();

            sqlParam.ParameterName = param.Name;
            sqlParam.DbType        = param.DbType;
            sqlParam.Value         = ReferenceEquals(param.Argument, null) ? DBNull.Value : param.Argument;
            sqlParam.Direction     = param.Direction;
            sqlParam.FixParameterRange();

            return(sqlParam);
        }