public async Task Update(DeviceModel model)
        {
            await _db.Load();

            var devices = _db.Collection
                          .DevicesById(model.Id)
                          .ToList();

            devices.ForEach(x =>
            {
                x.IncludeSaveConfig = model.IncludeSaveConfig;
                x.Frames.ForEach(frame => frame.Device = DeviceDto.MapFrom(model));
            });
            await _db.Save();
        }
Esempio n. 2
0
 private void AddBytesAndDevice()
 {
     SelectedFrame.Bytes    = _frameBytes?.Select(x => x.Value).ToArray();
     SelectedFrame.DeviceId = SelectedDevice.Id;
     SelectedFrame.Device   = DeviceDto.MapFrom(SelectedDevice);
 }