示例#1
0
        public ActionResult Delete(int id)
        {
            MusicAlbumRepository musicAlbumRepository = new MusicAlbumRepository();
            MusicAlbum           musicAlbum           = new MusicAlbum();

            using (musicAlbumRepository)
            {
                musicAlbum = musicAlbumRepository.SelectOne(id);
            }

            return(View(musicAlbum));
        }
示例#2
0
            public ActionResult Details(int id)
            {
                //
                // instantiate a repository
                //

                MusicAlbumRepository musicAlbumRepository = new MusicAlbumRepository();
                MusicAlbum           musicAlbum           = new MusicAlbum();

                //
                // get a brewery that has the matching id
                //

                using (musicAlbumRepository)
                {
                    musicAlbum = musicAlbumRepository.SelectOne(id);
                }

                return(View(musicAlbum));
            }