예제 #1
0
        public static void AddPhoto(PhotoModel photo)
        {
            byte[] image = new byte[photo.Image.ContentLength];
            photo.Image.InputStream.Read(image, 0, photo.Image.ContentLength);

            Logic.photosLogic.AddPhoto(photo.AlbumId, photo.Title, photo.AccountLogin, image);
        }
예제 #2
0
        public static IEnumerable <PhotoModel> GetPhotosByAlbum(int albumId)
        {
            var photos = Logic.photosLogic.GetPhotosByAlbum(albumId);

            return(PhotoModel.GetAll().Where(x => x.AlbumId == albumId).ToArray());
        }