Beispiel #1
0
        public void TestDeleteByPK()
        {
            Person pk = new Person()
            {
                ID = 10
            };
            string sql = _emit.Remove <Person>(pk);

            Assert.AreEqual("DELETE \"PERSON\" WHERE \"ID\" = 10", sql);
        }
Beispiel #2
0
        public void TestDeleteByPK()
        {
            Person pk = new Person()
            {
                ID = 10
            };
            string sql = _emit.Remove <Person>(pk);

            Assert.AreEqual("DELETE `Person` WHERE `ID` = 10", sql);
        }
Beispiel #3
0
 public long Remove <T>(T entity)
 {
     try
     {
         string sql = _emit.Remove(entity);
         _log.Debug(sql);
         _exe.ExecuteNonQuery(sql);
         return(_exe.AffectedRows);
     }
     catch (Exception ex)
     {
         throw ex.CreateWrapException <ORMException>();
     }
 }