﻿@model IEnumerable<BatteryCommander.Common.Models.Soldier>

@{
    ViewBag.Title = "List";
}

<h2>List</h2>

<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.LastName)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.FirstName)
        </th>
        <th></th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.LastName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.FirstName)
            </td>
            <td>
                @Html.ActionLink("Edit", "Edit", new { id = item.Id })
            </td>
        </tr>
    }

</table>

﻿@model IEnumerable<BatteryCommander.Common.Models.Soldier>

@{
    ViewBag.Title = "List";
}

<h2>@ViewBag.Title</h2>

    <table class="table">
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.FirstOrDefault().LastName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.FirstOrDefault().FirstName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.FirstOrDefault().Rank)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.FirstOrDefault().Status)
            </th>
            <th></th>
        </tr>

        @foreach (var item in Model)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.LastName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.FirstName)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Rank)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Status)
                </td>
                <td>
                    @Html.ActionLink("Edit", "Edit", new { soldierId = item.Id })
                </td>
            </tr>
        }

    </table>

Fix list view template for soldiers
Fix list view template for soldiers
