I am very new to .NET, used to working in PHP. I need to iterate via foreach through a dictionary of objects. My setup is an MVC4 app.
The Model looks like this:
public class TestModels
{
    Dictionary<int, dynamic> sp = new Dictionary<int, dynamic>
    {
        {1, new {name="abc", age="1"}},
        {2, new {name="def", age="2"}}
    }
}
Controller:
public class TestController : Controller
{
   Models.TestModels obj = new Models.TestModels();
}
How do I loop through the obj object and retrieve the values of the dictionary and print them in the view?
 
     
     
     
     
     
     
    