public IActionResult CreateArticlePicture( [FromRoute] Guid articleId, [FromBody] ArticlePictureCreationDto articlePictureCreationDto ) { if (!_articleRepository.ArticleExists(articleId)) { return(NotFound("Artcile Not Exist")); } var pictureModel = _mapper.Map <ArticlePicture>(articlePictureCreationDto); _articleRepository.AddArticlePicture(articleId, pictureModel); _articleRepository.Save(); var pictureReturn = _mapper.Map <ArticlePictureDto>(pictureModel); return(CreatedAtRoute( "GetPicture", new { articleId = pictureModel.ArticleId, pictureId = pictureModel.Id }, pictureReturn )); }