@model IEnumerable<MyBanK.Models.ContaCorrente>

@{
    ViewData["Title"] = "Index";
}

<h1>Index</h1>

<p>
    <a asp-action="Create">Create New</a>
</p>
<table class="table">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.Id)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Titular)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.DataAbertura)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.Saldo)
            </th>
            <th></th>
        </tr>
    </thead>
    <tbody>
@foreach (var item in Model) {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.Id)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Titular)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.DataAbertura)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.Saldo)
            </td>
            <td>
                <a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
                <a asp-action="Details" asp-route-id="@item.Id">Details</a> |
                <a asp-action="Delete" asp-route-id="@item.Id">Delete</a> |
                <a asp-action="Movimento" asp-route-id="@item.Id">Movimento</a>
            </td>
        </tr>
}
    </tbody>
</table>
