public IActionResult Post([FromBody] EdgeDeviceDTO item) { var edgeDeviceItem = new EdgeDevice() { EdgeDeviceName = item.EdgeDeviceName }; _repository.Add(edgeDeviceItem); return(Ok(EdgeDeviceDTO.FromEdgeDevice(edgeDeviceItem))); }
public IActionResult GetById(int id) { var item = EdgeDeviceDTO.FromEdgeDevice(_repository.GetById <EdgeDevice>(id)); return(Ok(item)); }