예제 #1
0
        public List <PhotoAlbum> GetByHouseId(string houseId)
        {
            var param = new[]
            {
                new SqlParameter("@houseId", houseId),
            };
            var albums = Call(SP_PHOTO_ALBUM_GETBYHOUSEID, param, DataReader.ReadAlbum);

            foreach (var album in albums)
            {
                var imageAdapter = new ImageAdapter();
                album.Items = imageAdapter.GetByAlbumId(album.Id);
            }
            return(albums);
        }
예제 #2
0
        public PhotoAlbum GetById(string id)
        {
            var param = new[]
            {
                new SqlParameter("@id", id),
            };
            var album = Call(SP_PHOTO_ALBUM_GETBYID, param, DataReader.ReadAlbum).FirstOrDefault();

            if (album != null)
            {
                var imageAdapter = new ImageAdapter();
                album.Items = imageAdapter.GetByAlbumId(album.Id);
            }
            return(album);
        }