Thinking back to the HomeController action we created earlier called GetHomeTimeline, you will remember that we routed to a view called HomeTimeline. We have already created this view, but now we need to add some logic to it to render the tweets in our home timeline.
We, therefore, need to add a view for our home timeline, which we will add next:
- Open the HomeTimeline.cshtml file and add the following markup to the view:
@model TwitterViewModel @{ ViewBag.Title = "What's happening?"; } <h2>Home - Timeline</h2> <div class="row"> <div class="col-md-8"> @foreach (var tweet in Model.HomeTimelineTweets) { <blockquote class="twitter-tweet"> <p lang="en" dir="ltr"> <a href="@Html.DisplayFor(m => tweet.Url)"></a> ...