public async Task <ChapterUpdateModel> Update(string id, ChapterUpdateModel p)
        {
            var chapter = await GetById(id);

            _mapper.Map(p, chapter);
            await _chapters.ReplaceOneAsync(p => p.Id == id, chapter);

            return(p);
        }
Exemple #2
0
        public async Task <ChapterUpdateModel> Update(string id, ChapterUpdateModel chapterUpdate)
        {
            var chapter = await _chapterService.Update(id, chapterUpdate);

            return(chapter);
        }