public async Task <IActionResult> CreateMachine(ScaleMachineDto create) { //create.CreatedDate = DateTime.Now; if (await _settingService.AddMachine(create)) { return(NoContent()); } throw new Exception("Creating the setting failed on save"); }