Beispiel #1
0
        public async Task <Chapter> CreateChapter(Entities.Book book, Volume volume, Chapter chapter)
        {
            if (volume.Chapters.Any(v => v.Title == volume.Title))
            {
                return(chapter);
            }

            volume.AddChapter(chapter);
            await _bookRepository.UpdateAsync(book);

            return(chapter);
        }