private FanficDTO GetFanfic() { Fanfic fanfic = new EFRepositoryAbstractFabric().CreateFanficsRepository().GetFanficByComment(Id); return(new FanficDTO(fanfic.Id, fanfic.Name, fanfic.Description, fanfic.RatingValue, fanfic.CreationTimestamp, fanfic.LastUpdateTimestamp)); }
private List <FanficDTO> GetFanfics() { IEnumerable <Fanfic> entityFanfics = new EFRepositoryAbstractFabric().CreateAuthorsRepository().GetAuthorFanfics(Id); List <FanficDTO> modelFanfics = new List <FanficDTO>(); foreach (var f in entityFanfics) { modelFanfics.Add(f.ToModel()); } return(modelFanfics); }
private List <LikeDTO> GetLikes() { IEnumerable <Like> entityLikes = new EFRepositoryAbstractFabric().CreateChaptersRepository().GetChapterLikes(Id); List <LikeDTO> modelRatings = new List <LikeDTO>(); foreach (var like in entityLikes) { modelRatings.Add(like.ToModel()); } return(modelRatings); }
private List <RatingDTO> GetVotes() { IEnumerable <Rating> entityRatings = new EFRepositoryAbstractFabric().CreateAuthorsRepository().GetAuthorVotes(Id); List <RatingDTO> modelRatings = new List <RatingDTO>(); foreach (var r in entityRatings) { modelRatings.Add(r.ToModel()); } return(modelRatings); }