public async Task <IActionResult> UpdateMachine(ScaleMachineDto update) { if (await _settingService.UpdateMachine(update)) { return(NoContent()); } return(BadRequest($"Updating setting {update.ID} failed on save")); }
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"); }
public async Task <bool> UpdateMachine(ScaleMachineDto model) { try { var scale = _mapper.Map <ScaleMachine>(model); _repoScale.Update(scale); return(await _repoScale.SaveAll()); } catch (System.Exception) { throw; } }
public Task <bool> Update(ScaleMachineDto model) { throw new NotImplementedException(); }