﻿@model IEnumerable<BankingManagementClient.ProjectionStore.Projections.Client.ClientProjection>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.ElementAt(0)
                                               .ClientId)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.ElementAt(0)
                                               .ClientName)
        </th>
        <th></th>
    </tr>

    @foreach (var clientProjection in Model)
    {
        <tr>
            <td>
                @Html.ActionLink(clientProjection.ClientId.ToString(), "Details", new { id = clientProjection.ClientId })
            </td>
            <td>
                @Html.DisplayFor(modelItem => clientProjection.ClientName)
            </td>
        </tr>
    }

</table>
﻿@model IEnumerable<BankingManagementClient.ProjectionStore.Projections.Client.ClientProjection>

@{
    ViewBag.Title = "Index";
}

<h2>Clients</h2>

@if (Model.Any())
{
    <table class="table">
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.ElementAt(0)
                    .ClientId)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.ElementAt(0)
                    .ClientName)
            </th>
            <th></th>
        </tr>

        @foreach (var clientProjection in Model)
        {
            <tr>
                <td>
                    @Html.ActionLink(clientProjection.ClientId.ToString(), "Details", new {id = clientProjection.ClientId})
                </td>
                <td>
                    @Html.DisplayFor(modelItem => clientProjection.ClientName)
                </td>
            </tr>
        }
    </table>
}
else
{
    <p>No clients found.</p>
}
Check if there are any Clients on the list page
Check if there are any Clients on the list page
