App下载

try_webpages_cs_003 在线工具

try_webpages_cs_003 在线工具

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="/statics/demosource/showrazor.css" />
</head>
<body>
<span class="marked">@{

var db = Database.Open(&quot;SmallBakery&quot;);&nbsp;

var query = &quot;SELECT * FROM Product&quot;;&nbsp;

}</span>

<html>&nbsp;

<body>&nbsp;

<h1>Small Bakery Products</h1>&nbsp;

<table border=&quot;1&quot; width=&quot;100%&quot;>&nbsp;

<tr>

<th>Id</th>&nbsp;

<th>Product</th>&nbsp;

<th>Description</th>&nbsp;

<th>Price</th>&nbsp;

</tr>

<span class="marked">@foreach(var row in db.Query(query))

{</span>

<tr>&nbsp;

<td><span class="marked">@row.Id</span></td>&nbsp;

<td><span class="marked">@row.Name</span></td>&nbsp;

<td><span class="marked">@row.Description</span></td>&nbsp;

<td align=&quot;right&quot;><span class="marked">@row.Price</span></td>&nbsp;

</tr>&nbsp;

<span class="marked">}</span>

</table>&nbsp;

</body>&nbsp;

</html>
</body>
</html>
运行结果