How do i display the Track details? - The web app will work for get all tracks
Fantastic news! We've Found the answer you've been seeking!
Question:
How do i display the Track details?
- The web app will work for "get all" tracks and "get one" track. Example images are shown on the next page.
My code:Manager.cs
public IEnumerable
{
var getTracks = ds.Tracks
.Include("Album.Artist")
.Include("MediaType")
.OrderBy(a => a.Name)
.ToList();
//.SingleOrDefault(i => i.TrackId== id);
return mapper.Map
}
//add function TrackAdd public TrackAdd
Controller
public class TracksController : Controller
{
private Manager m = new Manager();
// GET: Track
public ActionResult Index()
{
var track = m.TrackGetAllWithDetail();
return View(track);
}
//GET: Track/Details/5
public ActionResult Details()
//TODO details isn't show up? figure out why
{
var track = m.TrackGetAllWithDetail();//(id.GetValueOrDefault());
if (track == null)
{
return HttpNotFound();
}
else
{
return View(track);
}
}
My index view is getting from TrackWithDetailViewModel but then what do I do for the details page?
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date: