예제 #1
0
 public bool DeleteSensorInfos(int startId, int endId)
 {
     using (DbConnection conn = new DbConnection())
     {
         try
         {
             SensorInfo.Delete(Where.And(Where.GreaterOrEqual("ID", startId), Where.LessOrEqual("ID", endId)));
             return(true);
         }
         catch (Exception)
         {
             return(false);
         }
     }
 }
예제 #2
0
 public bool Delete(int id)
 {
     using (DbConnection conn = new DbConnection())
     {
         try
         {
             SensorInfo.Delete(Where.Equal("ID", id));
             return(true);
         }
         catch (Exception)
         {
             return(false);
         }
     }
 }