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); } } }
public bool Delete(int id) { using (DbConnection conn = new DbConnection()) { try { SensorInfo.Delete(Where.Equal("ID", id)); return(true); } catch (Exception) { return(false); } } }