public ActionResult Invoice()
        {
            FruitShopDBEntities db              = new FruitShopDBEntities();
            List <Order>        orderList       = db.Orders.ToList();
            List <Customer>     customerList    = db.Customers.ToList();
            List <OrderDetail>  orderdetaillist = db.OrderDetails.ToList();

            ViewData["jointables"] = from order in orderList
                                     join customer in customerList on order.CustomerId equals customer.CustomerId into table1
                                     from customer in table1.DefaultIfEmpty()
                                     select new MultipleTableJoin {
                orderlist = order, customerlist = customer
            };

            return(View(ViewData["jointables"]));
        }
 public PaymentTypeRepository()
 {
     objfruitShopDBEntities = new FruitShopDBEntities();
 }
 public ItemRepository()
 {
     objfruitShopDBEntities = new FruitShopDBEntities();
 }
Пример #4
0
 public CustomerRepository()
 {
     objfruitShopDBEntities = new FruitShopDBEntities();
 }
 public BaseController()
 {
     objfruitShopDBEntities = new FruitShopDBEntities();
 }
 public OrderRepository()
 {
     objfruitShopDBEntities = new FruitShopDBEntities();
 }