Because we are sorting by a custom property we need to use the generic Value method.
You can use Query builder to construct your queries in a more structured and reusable manner. Use the UmbracoHelper or the IPublishedContentQuery interface to build queries dynamically. For more information, see the Querying & Models article.
Locate the @foreach loop, and change Model.Blostposts to the variable created above: blogposts:
@foreach (IPublishedContent post in blogposts)
Save the partial view - a confirmation message should appear confirming that the Partial view has been saved.
Now view both the Blog overview and the blog posts themselves in the browser to confirm that all is working as expected.
Summary
Nice job! In this lesson, you've learned what a Document Type is and how to add a new Property to it. You've also learned how to change Templates and sort by custom Properties.