Beispiel #1
0
        public override IEnumerable<Guid> GetChildIds(Guid parentId)
        {
            var query = Query.EQ("ParentId",
                                 parentId == JoinParentId.ToGuid()
                                     ? Guid.Empty
                                     : parentId);

            return Items.FindAs<ItemDto>(query).Select(it => it.Id).ToArray();
        }
Beispiel #2
0
 public override Guid GetParentId(Guid id)
 {
     var result = Items.FindOneByIdAs<ItemDto>(id);
     
     return result != null ? (result.ParentId != Guid.Empty ? result.ParentId : JoinParentId.ToGuid()) : Guid.Empty;
 }