Пример #1
0
        public async Task <ActionResult> Index()
        {
            var collection = db.Products;

            ViewBag.NotifierEntity = db.GetNotifierEntity <Product>(collection).ToJson();
            return(View(await collection.ToListAsync()));
        }
Пример #2
0
        public async Task <ActionResult> Employee()
        {
            var collection = db.Employee;

            ViewBag.NotifierEntity = db.GetNotifierEntity <Employee>(collection).ToJson();
            return(View(await collection.ToListAsync()));
        }
        public async Task <ActionResult> Index()
        {
            ViewBag.neProduct  = db.GetNotifierEntity <Product>(db.Products).ToJson();
            ViewBag.neCustomer = db.GetNotifierEntity <Customer>(db.Customers).ToJson();
            var prodx = await db.Products.ToListAsync();

            var customs = await db.Customers.ToListAsync();

            return(View(new MyClass()
            {
                Products = await db.Products.ToListAsync(), Customers = await db.Customers.ToListAsync()
            }));
        }