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

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

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

            return(list.Where(x => x.PostId == photoId).ToList());
        }
Esempio n. 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());
        }
Esempio n. 5
0
        public Comment Get(int id)
        {
            var list = ReadJson <Comment> .GetObjects(url);

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