public void deleteIoTDeviceConfiguration(int id) { DBHelper._IoTDeviceConfiguration dbhelp = new DBHelper._IoTDeviceConfiguration(); IoTDeviceConfiguration existingIoTDC = dbhelp.GetByid(id); dbhelp.Delete(existingIoTDC); }
public void updateIoTDeviceConfiguration(int id, Edit iotDC) { DBHelper._IoTDeviceConfiguration dbhelp = new DBHelper._IoTDeviceConfiguration(); IoTDeviceConfiguration existingIoTDC = dbhelp.GetByid(id); existingIoTDC.Name = iotDC.Name; existingIoTDC.DataType = iotDC.DataType; existingIoTDC.Description = iotDC.Description; existingIoTDC.DefaultValue = iotDC.DefaultValue; dbhelp.Update(existingIoTDC); }
public void addIoTDeviceConfiguration(Edit iotDC) { DBHelper._IoTDeviceConfiguration dbhelp = new DBHelper._IoTDeviceConfiguration(); var newIoTDeviceConfiguration = new IoTDeviceConfiguration() { Name = iotDC.Name, DataType = iotDC.DataType, Description = iotDC.Description, DefaultValue = iotDC.DefaultValue }; dbhelp.Add(newIoTDeviceConfiguration); }
public Detail getIoTDeviceConfigurationById(int id) { DBHelper._IoTDeviceConfiguration dbhelp = new DBHelper._IoTDeviceConfiguration(); IoTDeviceConfiguration iotDC = dbhelp.GetByid(id); return(new Detail() { Id = iotDC.Id, Name = iotDC.Name, DataType = iotDC.DataType, Description = iotDC.Description, DefaultValue = iotDC.DefaultValue }); }