@page 
@model ActorsRazorPages.Pages.Actors.IndexModel
@{
    ViewData["Title"] = "Index";
}

<h2>Index</h2>

<table class="table">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.Actors[0].FirstName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Actors[0].LastName)
            </th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model.Actors)
        {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.FirstName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.LastName)
            </td>
            <td>
                <a asp-page="./Details" asp-route-id="@item.Id">Details</a>
            </td>
        </tr>
        }
    </tbody>
</table>