示例#1
0
        public ActionResult Create()
        {
            ViewBag.CategoryId = new SelectList(cdb.GetAll(), "CategoryID", "CatName");


            return(View());
        }
        // GET: Admin/Categories
        public ActionResult Index()
        {
            //var model = await db.Category.ToListAsync();
            var model = db.GetAll();

            return(View(model));
        }
        public ActionResult Portfolio()
        {
            ViewBag.Message = "Portfolio.";

            ViewBag.Products = pDb.GetAll();

            ViewBag.Categories = cDb.GetAll();

            return(View());
        }
        // GET: Admin/Admin
        public ActionResult Index()
        {
            ViewBag.Roles      = RoleManager.Roles.Count();
            ViewBag.Users      = UserManager.Users.Count();
            ViewBag.Project    = pDb.GetAll().Count();
            ViewBag.Categories = cDb.GetAll().Count();



            return(View());
        }
示例#5
0
文件: CategoryBs.cs 项目: EdG570/Blog
 public IEnumerable <Category> GetAll()
 {
     return(db.GetAll());
 }
 public IEnumerable <CATEGORy> GetAll()
 {
     return(_objDAL.GetAll().ToList());
 }
示例#7
0
 public IEnumerable <tbl_Category> GetAll()
 {
     return(objDb.GetAll());
 }
示例#8
0
 public IEnumerable<tbl_Category> GetAll()
 {
     return catdb.GetAll();
 }