Commit e542ce39 authored by Scott DePouw's avatar Scott DePouw

Rename List RazorPage to Index to further mirror what the ToDoController does.

parent dedb4cc2
@page @page
@model CleanArchitecture.Web.Pages.ToDoRazorPage.ListModel @model CleanArchitecture.Web.Pages.ToDoRazorPage.IndexModel
<h2>To Do Items</h2> <h2>To Do Items</h2>
<h3>Razor Page</h3> <h3>Razor Page</h3>
......
...@@ -5,13 +5,13 @@ using System.Collections.Generic; ...@@ -5,13 +5,13 @@ using System.Collections.Generic;
namespace CleanArchitecture.Web.Pages.ToDoRazorPage namespace CleanArchitecture.Web.Pages.ToDoRazorPage
{ {
public class ListModel : PageModel public class IndexModel : PageModel
{ {
private readonly IRepository<ToDoItem> _todoRepository; private readonly IRepository<ToDoItem> _todoRepository;
public List<ToDoItem> ToDoItems { get; set; } public List<ToDoItem> ToDoItems { get; set; }
public ListModel(IRepository<ToDoItem> todoRepository) public IndexModel(IRepository<ToDoItem> todoRepository)
{ {
_todoRepository = todoRepository; _todoRepository = todoRepository;
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<ul> <ul>
<li><a asp-area="" asp-controller="ToDo" asp-action="Populate">Load Sample To Do Items</a></li> <li><a asp-area="" asp-controller="ToDo" asp-action="Populate">Load Sample To Do Items</a></li>
<li><a asp-area="" asp-controller="ToDo" asp-action="Index">List To Do Items</a></li> <li><a asp-area="" asp-controller="ToDo" asp-action="Index">List To Do Items</a></li>
<li><a asp-page="/ToDoRazorPage/List">List To Do Items (Razor Page)</a></li> <li><a asp-page="/ToDoRazorPage/Index">List To Do Items (Razor Page)</a></li>
<li><a href="/swagger">API Documentation (Swagger)</a></li> <li><a href="/swagger">API Documentation (Swagger)</a></li>
</ul> </ul>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment