title: How to access Model property in MVC View?
body: <p>I am struggling with an issue which seems very weird.</p>
  
  <p>1) I have a class named 'Tumblr':</p>
  
  <pre><code>public class Tumblr
  {
      public string BlogName { get; set; }
      public dynamic PhotosCollection { get; set; }
  }
  </code></pre>
  
  <p>2) I have a method in my controller:</p>
  
  <pre><code> public ActionResult Index()
   {
       var model = new List&lt;Tumblr&gt;();
       var client = new HttpClient();
       var task = client.GetAsync("http://api.tumblr.com/v2/blog/puppygifs.tumblr.com/posts/photo?api_key=SbvxQcWuuNr1mfRvILKKTqiztMGvR8hbGPBDA9PlMidrYdd8Ik")
                      .ContinueWith((taskWithMsg) =&gt;
                       {
                           var response = taskWithMsg.Result;
                           var jsonTask = response.Content.ReadAsAsync&lt;JObject&gt;();
                           jsonTask.Wait();
  
                           var jsonResponse = jsonTask.Result;
                           model = FillModel(jsonResponse, model)
                       });
        task.Wait();
        return View(model);
    }
  
    private List&lt;Tumblr&gt; FillModel(dynamic jsonObject, List&lt;Tumblr&gt; model)
    {
        var postObject = (JArray)jsonObject["response"].posts;
        var posts = postObject.Select(e =&gt; new Tumblr()
                    {
                        BlogName = e["blog_name"].ToString(),
                        PhotosCollection = e["photos"].Select(o =&gt; new
                        {
                            Photos = o["alt_sizes"].Select(s =&gt; new
                            {
                                Width = s["width"].ToString(), 
                                Height = s["width"].ToString(),
                                Url = s["width"].ToString(),
                            })
                        })
                    });
        model.AddRange(posts);
        return model;
    }
  </code></pre>
  
  <p>And here is my view:</p>
  
  <pre><code>@using System.Collections
  @{
      ViewBag.Title = "Home Page";
  }
  
  
  &lt;ol class="round"&gt;
  @foreach (dynamic blog in Model)
  {
      &lt;li class="one"&gt;
          &lt;h5&gt;@blog.BlogName&lt;/h5&gt;
          &lt;span&gt;@blog.PhotosCollection&lt;/span&gt;
          &lt;hr /&gt;
          &lt;hr /&gt;
          &lt;hr /&gt;
          @foreach (dynamic photos in blog.PhotosCollection)
          {
              foreach (var photo in photos.Photos)
              {
                  &lt;img src="@photo.Url" width="@photo.Width" height="@photo.Height"/&gt;
              }
          }
          &lt;hr /&gt;
      &lt;/li&gt;
  }
  &lt;/ol&gt;
  </code></pre>
  
  <p>When I try to run, it throws an error with:</p>
  
  <pre><code>'object' does not contain a definition for 'Photos'
  </code></pre>
  
  <p>I do not understand why it throws an error even though I have a property in my model.</p>