public string GenerateMenu()
        {
            var listMenu = new JVKDbContext().Menus.Where(c => c.StatusFlag == "A").ToList();

            //get root or home
            var root = listMenu.Where(c => c.ParentMenuUID == "the-root").SingleOrDefault();

            //start adding children to the root
            AddChildMenuItems(listMenu, root);

            stringMenu = stringMenu.Trim();
            stringMenu = new Regex("dropdown-menu").Replace(stringMenu, "nav navbar-nav", 1);
            stringMenu = stringMenu.Trim();

            return(stringMenu);
        }
Exemple #2
0
 public UserRepository(JVKDbContext context)
 {
     _context = context;
 }
 public JVKCache()
 {
     cache   = new Cache();
     context = new JVKDbContext();
 }
 public UnitOfWork(JVKDbContext context)
 {
     _context = context;
 }
 //ctor
 public UnitOfWork()
 {
     _context = new JVKDbContext();
 }
 public RolePermitRepository(JVKDbContext context)
 {
     _context = context;
 }