static private SensorData ConvertToBusiness(SensorDataFile value) { SensorData result = new SensorData(); result.IdSensor = value.Id; result.SensorName = value.SensorName; foreach (int idMeasureUnit in value.IdMeasuresUnits) { result.AddColumn(MeasureUnitSerializer.Get(idMeasureUnit)); } return(result); }
static public bool Exists(SensorData value) { List <SensorDataFile> data = _serializer.RecoverData(); SensorDataFile temp = new SensorDataFile(value); foreach (SensorDataFile val in data) { if (val.IdMeasuresUnits == temp.IdMeasuresUnits) { return(true); } } return(false); }