Ejemplo n.º 1
0
        private DbCommand CreateSqlCommand(IOctDbCommand cmd)
        {
            DbCommand execCmd = cmd.GetDbCommand(x => x, () => new SqlCommand(),
                                                 x => x.Select(p => new SqlParameter(p.Key, p.Value)).ToArray());

            return(execCmd);
        }
Ejemplo n.º 2
0
        public static DbCommand CreateSqlCommand(IOctDbCommand cmd)
        {
            DbCommand execCmd = cmd.GetDbCommand(x => x, () => new SqlCommand(),
                                                 x =>
            {
                if (x == null)
                {
                    return(new IDbDataParameter[0]);
                }
                return(x.Select(p => new SqlParameter(p.Key, p.Value)).ToArray());
            }
                                                 );

            return(execCmd);
        }