public void UpdateAlbum(Album album)
        {
            var context = new PhotoAlbumDataContext();
            var albumRow = new AlbumRow(album);

            // attach and update the photo row
            context.AttachTo(PhotoAlbumDataContext.AlbumTable, albumRow, "*");
            context.UpdateObject(albumRow);

            context.SaveChanges();
        }
        public void CreateAlbum(string albumName, string owner)
        {
            var context = new PhotoAlbumDataContext();

            var album = new Album
            {
                AlbumId = SlugHelper.GetSlug(albumName),
                Owner = owner.ToLowerInvariant(),
                Title = albumName
            };

            context.AddObject(PhotoAlbumDataContext.AlbumTable, new AlbumRow(album));
            context.SaveChanges();
        }