public IEnumerable <ContentDTO> GetWatchList(Guid UserID) { List <ContentDTO> WatchList = _ContentRepository.GetWatchList(UserID).ToList(); ContentAggregate ContentAgg = new ContentAggregate(); return(ContentAgg.GetWatchList()); }
public IEnumerable <ContentDTO> GetAll(Guid UserID) { List <GenreEntity> Genres = AutoMapperExtensions.MapList <GenreDTO, GenreEntity>(_GenreRepository.GetAll().ToList()); List <PersonEntity> Person = AutoMapperExtensions.MapList <PersonDTO, PersonEntity>(_PersonRepository.GetAll().ToList()); List <ContentEntity> Content = AutoMapperExtensions.MapList <ContentDTO, ContentEntity>(_ContentRepository.GetAll(UserID).ToList()); ContentAggregate ContentAgg = new ContentAggregate(Content, Genres, Person); return(ContentAgg.GetContentList()); }
public ContentDTO GetByID(Guid ID, Guid UserID) { List <GenreEntity> Genres = AutoMapperExtensions.MapList <GenreDTO, GenreEntity>(_GenreRepository.GetByContentID(ID).ToList()); List <PersonEntity> Person = AutoMapperExtensions.MapList <PersonDTO, PersonEntity>(_PersonRepository.GetByContentID(ID).ToList()); ContentEntity Content = AutoMapperExtensions.MapObject <ContentDTO, ContentEntity>(_ContentRepository.GetByID(ID, UserID)); Content.Video = _AwsVideoRepository.GetVideoUrl(Content.Video); ContentAggregate ContentAgg = new ContentAggregate(Content, Genres, Person); return(ContentAgg.GetContent()); }