public ActionResult CustomerDetails(string customerId) { var db = new NorthwindDb(connectionString); Customer customer = db.GetCustomerById(customerId); return View(customer); }
public ActionResult Products(int categoryId) { NorthwindDb db = new NorthwindDb(connectionString); IEnumerable<Product> products = db.GetProductsByCategoryId(categoryId); return View(products); }
public ActionResult Customers() { var db = new NorthwindDb(connectionString); var customers = db.GetCustomers(); return View(customers); }
public ActionResult Categories() { NorthwindDb db = new NorthwindDb(connectionString); IEnumerable<Category> categories = db.GetCategories(); return View(categories); }