public async Task <DeviceConfig> UpdateDevice(TcpDeviceEditViewModel model) { var device = await _modbusService.GetDeviceById(model.Id); device.Title = model.Title; device.Ip = model.Ip; device.Port = model.Port; return(device); }
public async Task <IActionResult> DeviceRemove(int id) { await _modbusService.Remove(await _modbusService.GetDeviceById(id)); return(RedirectToAction(nameof(Index))); }