Created
December 29, 2017 23:58
-
-
Save A2H111/64d030492f33d870f71d7b21da862cda to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@model IEnumerable<AspNetCoreMVCMongoDBDemo.Models.Customer> | |
@{ | |
ViewData["Title"] = "Index"; | |
} | |
<h2>Index</h2> | |
<p> | |
<a asp-action="Create">Create New</a> | |
</p> | |
<table class="table table-bordered" style="width:600px"> | |
<thead> | |
<tr> | |
<th> | |
@Html.DisplayNameFor(model => model.CustomerId) | |
</th> | |
<th> | |
@Html.DisplayNameFor(model => model.CustomerName) | |
</th> | |
<th> | |
@Html.DisplayNameFor(model => model.Address) | |
</th> | |
<th>Actions</th> | |
</tr> | |
</thead> | |
<tbody> | |
@foreach (var item in Model) | |
{ | |
<tr> | |
<td> | |
@Html.DisplayFor(modelItem => item.CustomerId) | |
</td> | |
<td> | |
@Html.DisplayFor(modelItem => item.CustomerName) | |
</td> | |
<td> | |
@Html.DisplayFor(modelItem => item.Address) | |
</td> | |
<td> | |
@Html.ActionLink("Edit", "Edit", new { id = item.CustomerId }) | | |
@Html.ActionLink("Details", "Details", new { id = item.CustomerId }) | | |
@Html.ActionLink("Delete", "Delete", new { id = item.CustomerId }) | |
</td> | |
</tr> | |
} | |
</tbody> | |
</table> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment