public async Task <IActionResult> updateGroup(int id, componentForUpdateDTO _componentForUpdateDTO) { var componentForRepo = await _repo.GetComponent(id); _mapper.Map(_componentForUpdateDTO, componentForRepo); if (await _repo.SaveAll()) { return(NoContent()); } throw new Exception($"Updating user {id} failed on save"); }