public ActionResult Index()
{
var pr = db.products;
return View(pr);
}
Firstly - I want to pass to the view more data - something like:>
I have done this by making a ViewModel specific to the view you need the information in.
Then within that ViewModel just have properties to house your other models.
Something like this:
public class ViewModel
{
public List Products(){get; set;}
public List LinksForProducts(){get; set;}
}
public ActionResult Index()
{
var pr = db.products;
var lr = db.linksforproducts(2)
ViewModel model = new ViewModel();
model.Products = pr;
model.LinksForProducts = lr;
return View(model);
}