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
Jignesh KumarPosted Apr 22, 2021, 3:48 AM
Suraj DubeyPosted Apr 22, 2021, 3:47 AM
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.