Example #1
0
 public async Task <IActionResult> UpdateMachine(ScaleMachineDto update)
 {
     if (await _settingService.UpdateMachine(update))
     {
         return(NoContent());
     }
     return(BadRequest($"Updating setting {update.ID} failed on save"));
 }
Example #2
0
        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");
        }
Example #3
0
 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;
     }
 }
Example #4
0
 public Task <bool> Update(ScaleMachineDto model)
 {
     throw new NotImplementedException();
 }