private void UpdateChapterLikes(int chapterId) { ChapterDTO chapter = _fabric.CreateChaptersRepository().Get(chapterId).ToModel(); chapter.LikesCounter = chapter.Likes.Count; _fabric.CreateChaptersRepository().Update(chapter.ToEntity()); }
public void Update(ChapterDTO chapter) { _fabric.CreateChaptersRepository().Update(chapter.ToEntity()); }
public void Delete(ChapterDTO chapter) { int fanficId = chapter.Fanfic.Id; _fabric.CreateChaptersRepository().Delete(chapter.ToEntity()); }