Exemple #1
0
 public QExpr(string lhs, string op, object rhs)
 {
     LHS = lhs;
     RHS = rhs;
     Operator = op;
     QParam = new QParam(lhs, Constants.QueryCompareOps.TransformRHS(op, rhs));
 }
Exemple #2
0
        public virtual bool Delete(Model model)
        {
            QParam pkParam = new QParam(model.ModelPKName, model.PK, 1);

            string deleteSql = string.Format("DELETE FROM {0} WHERE {1}={2}",
                model.ModelDbName,
                model.ModelPKName,
                pkParam.Id);

            ExecuteNonQuery(deleteSql, new QParam[] { pkParam });
            return true;
        }