1 min read

Create an Asp.Net Core MVC app with the repository pattern Part 6 – Create a view for the controller.

Finally create a new View and assign it the model of type Order.

@model IEnumerable<SuperSimpleApp.Models.Order>

@foreach (var order in Model)
{
    <h3>@order.CustomerName</h3>
    <h4>@order.CoffeeSelected</h4>
    <br />
}

Now launch the app and head over to the Order page to see the result!

Awesome! Great work!

Leave a Reply