I have two tables Date and Song. Where DateId is foreign key to Song table.
- Date:
DateId
Date
- Song:
SongId
DateId
Title
Here is the function:
public ActionResult Index()
{
var song = db.TopSongs;
var model = db.Dates;
var latestDate = model.OrderByDescending(d => d.Date).FirstOrDefault();
return View(latestDate);
}
I need to show:
Date SongId Title
in View. But return View is taking only one parameter. Is there a way to pass both table data to view?