Database Reference
In-Depth Information
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Entity Framework Recipes - Recipe 1</title>
</head>
<body>
<h2>Manage Apps Category</h2>
<p>
@Html.ActionLink("Create New", "Create")
</p>
<table>
<tr>
<th>
@Html.DisplayNameFor(model => model.Name)
</th>
<th>
@Html.DisplayNameFor(model => model.Description)
</th>
<th></th>
</tr>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Description)
</td>
<td>
@Html.ActionLink("Edit", "Edit", new { id=item.CategoryId }) |
@Html.ActionLink("Details", "Details", new { id=item.CategoryId }) |
@Html.ActionLink("Delete", "Delete", new { id=item.CategoryId })
</td>
</tr>
}
</table>
</body>
</html>
Listing 4-4. The Code of Create View
@model MyStore.Models.Category
@{
Layout = null;
}
<!DOCTYPE html>
 
Search WWH ::




Custom Search