@model IEnumerable<WebApplication1.Models.news>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table class="table">
    <tr>
        <th>
            @Html.DisplayNameFor(model => model.title)
        </th>
        <th>
           category
        </th>
        <th>
            @Html.DisplayNameFor(model => model.tag)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.publishDate)
        </th>
        <th>
            @Html.DisplayNameFor(model => model.views)
        </th>
        <th></th>
    </tr>

    @foreach (var item in Model)
    {
        <tr>
            <td>
                @Html.DisplayFor(modelItem => item.title)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.cat)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.tag)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.publishDate)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.views)
            </td>
            <td>
                @Html.ActionLink("Edit", "Edit", new { id = item.ID }) |
                @Html.ActionLink("Details", "Details", new { id = item.ID }) |
                @Html.ActionLink("Delete", "Delete", new { id = item.ID })
            </td>
        </tr>
    }

</table>
