コード例 #1
0
 public ActionResult CustomerDetails(string customerId)
 {
     var db = new NorthwindDb(connectionString);
     Customer customer = db.GetCustomerById(customerId);
     return View(customer);
 }
コード例 #2
0
 public ActionResult Products(int categoryId)
 {
     NorthwindDb db = new NorthwindDb(connectionString);
     IEnumerable<Product> products = db.GetProductsByCategoryId(categoryId);
     return View(products);
 }
コード例 #3
0
 public ActionResult Customers()
 {
     var db = new NorthwindDb(connectionString);
     var customers = db.GetCustomers();
     return View(customers);
 }
コード例 #4
0
 public ActionResult Categories()
 {
     NorthwindDb db = new NorthwindDb(connectionString);
     IEnumerable<Category> categories = db.GetCategories();
     return View(categories);
 }