Guest User

Guest User

  • Tech Writer
  • 2.1k
  • 470.6k

Does return view has more than for one select statement?

Apr 22 2021 3:30 AM
Hi Team
 
I have psuedo code, i want to have each forloop have its own return tye from the query on a table. Meaning i want to create each record on a return view if its allowed?
  1. // Controller  
  2.   
  3. public ActionResult List() {  
  4.   
  5. ProdMan db = new ProdMan();  
  6.   
  7. return View(from scheduleList in schedule.Take(5) select scheduleList,  
  8.   
  9. from WeekList in Week.Take(3) select WeekList  
  10.   
  11.   
  12.  }  
  13.   
  14. Is this allowed in asp.net mvc  
 

Answers (2)