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?
- // Controller
- public ActionResult List() {
- ProdMan db = new ProdMan();
- return View(from scheduleList in schedule.Take(5) select scheduleList,
- from WeekList in Week.Take(3) select WeekList
- }
- Is this allowed in asp.net mvc

Suraj DubeyRank #2,182 · 647 reputationPosted Apr 21, 2021, 11:47 PM EDT
Try this hope it will help you
https://www.c-sharpcorner.com/article/managing-data-with-viewmodel-in-asp-net-mvc/
https://www.tektutorialshub.com/asp-net-core/asp-net-core-passing-data-from-controller-to-view/#:~:text=The%20View%20Models%20can%20be,Views%20using%20the%20%40model%20directive.
Jignesh KumarRank #91 · 22.9K reputationPosted Apr 21, 2021, 11:48 PM EDT