Exemplo n.º 1
0
        // GET: Category
        public ActionResult Categories()
        {
            using (var ef = new LibraryEntities())
            {
                lstCategories = ef.GetAllCategory().ToList();
            }

            lstCategories = lstCategories.OrderBy(o => o.idCategory).ToList();

            return(View(lstCategories));
        }
Exemplo n.º 2
0
        public ActionResult NewBook()
        {
            var library = new Models.Library();

            using (var ef = new LibraryEntities())
            {
                library.lstCategories = ef.GetAllCategory().ToList();
            }

            return(View(library));
        }