Exemple #1
0
        public List <Photo> GetPhotoByAlbumId(int albumId)
        {
            var list = ReadJson <Photo> .GetObjects(url);

            return(list.Where(x => x.AlbumId == albumId).ToList());
        }
Exemple #2
0
        public Photo Get(int id)
        {
            var list = ReadJson <Photo> .GetObjects(url);

            return(list.FirstOrDefault(x => x.Id == id));
        }
Exemple #3
0
        public List <Comment> GetCommentByPhotoId(int photoId)
        {
            var list = ReadJson <Comment> .GetObjects(url);

            return(list.Where(x => x.PostId == photoId).ToList());
        }
Exemple #4
0
        public List <Album> Get(int?id)
        {
            var list = ReadJson <Album> .GetObjects(url);

            return(id == null ? list : list.Where(x => x.Id == id).ToList());
        }
Exemple #5
0
        public Comment Get(int id)
        {
            var list = ReadJson <Comment> .GetObjects(url);

            return(list.FirstOrDefault(x => x.Id == id));
        }