public ActionResult New(AddTrackViewModel model) { var album = _albumStore.Get(model.AlbumId); album.AddTrack(new Track(model.TrackNo, model.Name, model.TrackLength)); return RedirectToAction("Index", "Album", new {album.Id}); }
public ActionResult Index(string albumId) { var album = _albumStore.Get(albumId); var model = new AddTrackViewModel { AlbumId = album.Id, AlbumName = album.Name}; return View(model); }