Beispiel #1
0
        public void SetMachine(string jsonObject)
        {
            var machineViewModel = JsonConvert.DeserializeObject <MachineViewModel>(jsonObject);

            if (_machineService.GetByMacAdress(machineViewModel.MacAddress) != null)
            {
                _machineService.Update(machineViewModel);
            }
            else
            {
                _machineService.Add(machineViewModel);
            }

            _uof.Commit();
        }