// GET: OrderController public ActionResult Index(int id) { ViewBag.cust = _custBL.GetCustomerById(id); List <Orders> orderList = _orderBL.GetOrders(_custBL.GetCustomerById(id)); return(View(orderList .Select(Orders => new OrderVM(Orders)) .ToList())); }
// GET: CustomerController/Delete/5 public ActionResult Delete(int id) { return(View(new CustomerVM(_custBL.GetCustomerById(id)))); }