Example #1
0
        public async Task <IEnumerable <Album> > Get(int?userId)
        {
            if (userId.HasValue)
            {
                return(await _photoAlbumService.GetAlbums(a => a.UserId == userId.Value));
            }

            return(await _photoAlbumService.GetAlbums());
        }
Example #2
0
        public IEnumerable <AlbumApi> GetAlbums()
        {
            var albums = _photoAlbumService.GetAlbums();

            return(albums.ToArray());
        }