Exemplo n.º 1
0
        public async Task <ChannelConfig> UpdateChannel(TcpChannelEditViewModel model)
        {
            var channel = await _modbusService.GetChannelById(model.Id);

            channel.Title = model.Title;

            return(channel);
        }
Exemplo n.º 2
0
        public async Task <IActionResult> ChannelRemove(int id)
        {
            await _modbusService.Remove(await _modbusService.GetChannelById(id));

            return(RedirectToAction(nameof(Index)));
        }