public ActionResult Index()
{
var pr = db.products;
return View(pr);
}
Firstly - I want to pass to the view more data - something like:>
Usually - You create view model per view.
In Your case, that would be:
public class IndexModel{
public ProductModel[] Products{get;set;}
public LinkForProduct[] Links{get;set;}
}
public ActionResult Index(){
var model=new IndexModel{
Products=Map(db.products),
Links=Map(db.linksforproducts(2)};
return View(model);
}