예제 #1
0
        public ExternalSiteMapNode GetTree()
        {
            const string nameOrConnectionString = "zExpenseConnectionString"; // todo remove hardcode
            var dbContext = new StandardDbContext( nameOrConnectionString );
            Zac.StandardCore.Repositories.ISiteMapNodeRepository repository =
                new Zac.StandardInfrastructure.EntityFramework.Repositories.SiteMapNodeRepository( dbContext );

            IEnumerable<SiteMapNode> siteMapNodes = repository.GetAll();
            TreeNode<SiteMapNode> root = TreeNodeHelper.CreateTree( siteMapNodes );

            return GetExternalSiteMap( root, null );
        }
예제 #2
0
 public StandardUnitOfWork( StandardDbContext context )
     : base(context)
 {
 }