I have an ASP.NET MVC view, which is there only for testing and diagnosis purposes. Once a while I pass a completely different object (model) to it, and render its properties to see the state of the object. However, this needs the view to be modified for each object.
How can I create an object dumper view? By object dumper view, I mean a view which doesn't need to be changed in any way, on change of its related model. For example, on passing a user
object, or a product
object, or anything else, the view remain untouched, while still functioning correctly.
return View(user);
return View(product);
return View(googleAnalyticsFeed);