public ChannelConfig GetChannel(TcpChannelCreateViewModel model) { return(new ChannelConfig() { Title = model.Title, Type = model.Type }); }
public async Task <IActionResult> TcpChannelCreate(TcpChannelCreateViewModel model) { if (ModelState.IsValid) { await _modbusService.Create(_modbusFactory.GetChannel(model)); model = _modbusFactory.GetTcpChannelCreateViewModel(); //RedirectToAction(nameof(Index)); } return(PartialView("_TcpChannelCreatePartial", model)); }