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); }
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); }