Esempio n. 1
0
        public ActionResult Index()
        {
            var db = new MassiveDemo.DB.DynamicModel("MassiveDemo");
            var result = db.Query("SELECT * FROM Products");

            var products = result.Select(p => new Product() { Id = p.Id, Name = p.Name }).ToList();
            return View(products);
        }
Esempio n. 2
0
        public ActionResult Index()
        {
            var db     = new MassiveDemo.DB.DynamicModel("MassiveDemo");
            var result = db.Query("SELECT * FROM Products");

            var products = result.Select(p => new Product()
            {
                Id = p.Id, Name = p.Name
            }).ToList();

            return(View(products));
        }