示例#1
0
        public SiteMapNode GetParent( SiteMapNode entity )
        {
            var query =
                from x in SiteMapNodeRepository.GetQueryable()
                where x.Lft < entity.Lft && x.Rgt > entity.Lft
                orderby x.Lft descending
                select x;

            SiteMapNode parent = query.FirstOrDefault();
            return parent;
        }
示例#2
0
 public void Save( SiteMapNode entity )
 {
     throw new NotImplementedException();
 }
示例#3
0
 public void InsertUnderNode( SiteMapNode entity, long id )
 {
     InsertNode( entity, id, null );
 }
示例#4
0
 public void InsertAfterNode( SiteMapNode entity, long id )
 {
     InsertNode( entity, 0, id );
 }
示例#5
0
 private void UpdateNode( SiteMapNode entity, long parentId, long? previousSiblingId )
 {
     using ( var scope = new TransactionScope() )
     {
         SiteMapNodeRepository.UpdateNode( entity, parentId, previousSiblingId );
         SiteMapNodeRepository.Update( entity );
         _standardUnitOfWork.Save();
         scope.Complete();
     }
 }
示例#6
0
 public void UpdateAndPositionUnderNode( SiteMapNode entity, long id )
 {
     UpdateNode( entity, id, null );
 }
示例#7
0
 public void UpdateAndPositionAfterNode( SiteMapNode entity, long id )
 {
     UpdateNode( entity, 0, id );
 }
 public void UpdateNode( SiteMapNode entity, long parentId, long? previousSiblingId )
 {
     throw new NotImplementedException();
 }
 public void InsertNode( SiteMapNode entity, long parentId, long? previousSiblingId )
 {
     _siteMapNodes.Add( entity );
 }
 public void Insert( SiteMapNode entity )
 {
     //throw new NotImplementedException();
 }