Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
56 lines (54 sloc) 1.62 KB
@addTagHelper "*, Microsoft.AspNetCore.Mvc.TagHelpers"
@model IEnumerable<DataAccessTutorial.Web.Models.Product>
<!doctype html>
<html lang="">
<head>
<meta charset="utf-8" />
<title></title>
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<!-- Place favicon.ico in the root directory -->
<style>
table {
margin-left: 10px;
}
table, th{
border-bottom: 1px solid black;
}
td {
padding: 5px;
}
</style>
</head>
<body>
<h1>Using Sqlite without migrations</h1>
<table>
<thead>
<tr>
<th>Id</th>
<th>Name</th>
<th>Price</th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var product in Model)
{
<tr>
<td>@product.Id</td>
<td>@product.Name</td>
<td>@product.Price</td>
<td><a asp-action="Update" asp-route-id="@product.Id">Modify</a></td>
<td><form asp-action="Delete" method="post" asp-route-id="@product.Id"><input type="submit" value="Delete"/></form></td>
</tr>
}
<tr>
<td colspan="5">
<a asp-action="Create">Add</a>
</td>
</tr>
</tbody>
</table>
</body>
</html>