I want to deliver content from different queries to the view from a single controller action method.
Currently, I have controller and I fire two queries on same table, first take students who are in 8 std and second who are in 9 std:
public class StudentController : Controller
{
private MyDatabase db = new MyDatabase();
public ActionResult Index()
{
var query = db.table1.where(t => t.Class_ID == 8);
var query2 = db.table1.where(t => t.Class_ID == 9);
return View(query1, query2));
}
}
Then I want to display query1 and query2 data on a Index view of Student controller. Please help me. Thanking for all replies