Example #1
0
        public void deleteIoTDeviceConfiguration(int id)
        {
            DBHelper._IoTDeviceConfiguration dbhelp        = new DBHelper._IoTDeviceConfiguration();
            IoTDeviceConfiguration           existingIoTDC = dbhelp.GetByid(id);

            dbhelp.Delete(existingIoTDC);
        }
Example #2
0
        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);
        }
Example #3
0
        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);
        }
Example #4
0
        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
            });
        }