public ActionResult Delete(int id) { MusicAlbumRepository musicAlbumRepository = new MusicAlbumRepository(); MusicAlbum musicAlbum = new MusicAlbum(); using (musicAlbumRepository) { musicAlbum = musicAlbumRepository.SelectOne(id); } return(View(musicAlbum)); }
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)); }