For my first MVC app I'm trying to build a page that takes user input and returns data based on that input.
So far it's working and pulling data from one table. I wan't to be able to display data from multiple queries
and display them on separate tables on the page.
As you can see below I'm returning data from the CSLA_Depot table. How do I return data from multiple
queries and display them in the view all on the same page?
public class HelloWorldController : Controller
{
UAStagingEntities db = new UAStagingEntities();
public ActionResult Index(int? id)
{
var depot = from m in db.CSLA_DEPOT
where m.DEPOT_ID==id
select m;
return View(depot.ToList());
}
}
Member
11 Points
79 Posts
Display mulitple queries
Oct 05, 2010 12:18 PM|Je_fait_le_logiciel|LINK
For my first MVC app I'm trying to build a page that takes user input and returns data based on that input.
So far it's working and pulling data from one table. I wan't to be able to display data from multiple queries
and display them on separate tables on the page.
As you can see below I'm returning data from the CSLA_Depot table. How do I return data from multiple
queries and display them in the view all on the same page?
mvc2 vs2008