public async Task <IActionResult> DeleteMachine(int id) { var settings = await _settingService.DeleteMachine(id); if (settings) { return(NoContent()); } throw new Exception("Deleting the setting failed on save"); }