@{ var db = Database.Open("SmallBakery"); var query = "SELECT * FROM Product"; } <html> <body> <h1>Small Bakery Products</h1> <table border="1" width="100%"> <tr> <th>Id</th> <th>Product</th> <th>Description</th> <th>Price</th> </tr> @foreach(var row in db.Query(query)) { <tr> <td>@row.Id</td> <td>@row.Name</td> <td>@row.Description</td> <td align="right">@row.Price</td> </tr> } </table> </body> </html>
by: 发表于:2017-11-02 09:51:00 顶(0) | 踩(0) 回复
??
回复评论