I want to use an ExpandoObject as the viewmodel for a Razor view of type ViewPage. I get an error when I do this
ViewPage
ExpandoObject o
Using the open source Dynamitey (in nuget) you could make a graph of ExpandoObjects with a very clean syntax;
dynamic Expando = Build.NewObject; var o = Expando ( stuff: Expando(foo:"bar") ); return View(o);