public async Task <bool> Update(ArtProcessDto model) { var artProcess = _mapper.Map <ArtProcess>(model); _repoArticalNo.Update(artProcess); return(await _repoArticalNo.SaveAll()); }
public async Task <IActionResult> Update(ArtProcessDto update) { if (await _artProcessService.Update(update)) { return(NoContent()); } return(BadRequest($"Updating the article no {update.ID} failed on save")); }
public async Task <IActionResult> Create(ArtProcessDto create) { if (_artProcessService.GetById(create.ID) != null) { return(BadRequest("Article ID already exists!")); } if (await _artProcessService.Add(create)) { return(NoContent()); } throw new Exception("Creating the article no failed on save"); }