public LineActiveSwitchModel PostLineActiveSwitch(LineActiveSwitchModel data) { var res = new LineActiveSwitchModel(); using (var logic = new LineLogic()) { res.Done = logic.SwitchActive(data.LineId, data.Active); res.LineId = data.LineId; res.Active = data.Active; } return(res); }