| CategoryID | CategoryName | Description |
|---|---|---|
| 1 | Beverages | Soft drinks, coffees, teas, beers, and ales |
| 2 | Condiments | Sweet and savory sauces, relishes, spreads, and seasonings |
| 3 | Confections | Desserts, candies, and sweet breads |
| 4 | Dairy Products | Cheeses |
| 5 | Grains/Cereals | Breads, crackers, pasta, and cereal |
| 6 | Meat/Poultry | Prepared meats |
| 7 | Produce | Dried fruit and bean curd |
| 8 | Seafood | Seaweed and fish |
public class CategoryTable : MvcTable<Category>
{
public override void Configure(IStaticTableConfiguration<Category> config)
{
config
.ScaffoldAllColumns()
.SetAction("ListCategories", "Northwind")
.SetCssClass("table table-striped");
}
}
public ActionResult ListCategories(TableRequestModel request)
{
var entities = new NorthwindEntities(NorthwindServiceUrl);
return TableResult.From(entities.Categories).Build<CategoryTable>(request);
}
@Html.Action("ListCategories", new { request = new TableRequestModel() })