public List <Photo> GetPhotoByAlbumId(int albumId) { var list = ReadJson <Photo> .GetObjects(url); return(list.Where(x => x.AlbumId == albumId).ToList()); }
public Photo Get(int id) { var list = ReadJson <Photo> .GetObjects(url); return(list.FirstOrDefault(x => x.Id == id)); }
public List <Comment> GetCommentByPhotoId(int photoId) { var list = ReadJson <Comment> .GetObjects(url); return(list.Where(x => x.PostId == photoId).ToList()); }
public List <Album> Get(int?id) { var list = ReadJson <Album> .GetObjects(url); return(id == null ? list : list.Where(x => x.Id == id).ToList()); }
public Comment Get(int id) { var list = ReadJson <Comment> .GetObjects(url); return(list.FirstOrDefault(x => x.Id == id)); }