Is there a better way to display data from multiple sources in MVC via the return View()?
I basically made call to the two disparate sources then filled a common collection where I could combine the results. Was just wondering if I could return both data objects instead of having to combine them?
Any suggestions would be appreciated.
thanks,
S
It’s common to use a ViewModel which can hold multiple collections or other types to pass to your view.
If you don’t want / need strongly typed views, you can use ViewBag or ViewData to pass multiple collections to your view as well: