Beispiel #1
0
        protected IDbCommand InsertarSqlBuildQuery(string tabla, Dictionary <string, object> myDic, OleDbCommand oleDbCommand)
        {
            var oSqlBuildQuery = SqlBuildQuery.InsertInto(tabla, oleDbCommand);

            foreach (KeyValuePair <string, object> item in myDic)
            {
                oSqlBuildQuery.Campo <Object>(item.Key, item.Value);
            }
            return(oSqlBuildQuery.ToDbCommand());
        }
Beispiel #2
0
        protected IDbCommand ActualizarSqlBuildQuery(string tabla, Dictionary <string, object> myDic, OleDbCommand oleDbCommand)
        {
            var oSqlBuildQuery = SqlBuildQuery.Update(tabla, oleDbCommand);

            foreach (KeyValuePair <string, object> item in myDic)
            {
                oSqlBuildQuery.Campo <Object>(item.Key, item.Value);
            }
            oSqlBuildQuery.Where <string>(this.ClavePrimaria, this.ValorClavePrimaria.ToString());

            return(oSqlBuildQuery.ToDbCommand());
        }