示例#1
0
 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});
 }
示例#2
0
 public ActionResult Index(string albumId)
 {
     var album = _albumStore.Get(albumId);
     var model = new AddTrackViewModel { AlbumId = album.Id, AlbumName = album.Name};
     return View(model);
 }