public MachineModel Save(MachineModel machineModel) { if (machineModel.Equals(null)) { return(null); } return(repository.Save(machineModel)); }
public IActionResult Save([FromBody] MachineModel element) { if (element.Equals(null)) { return(BadRequest()); } var machine = machineService.Save(element); if (machine.Equals(null)) { return(NotFound()); } return(Ok(Newtonsoft.Json.JsonConvert.SerializeObject(machine))); }