/// <summary> /// 获取索引信息 /// </summary> /// <returns></returns> public List <MongoIndexModel> GetIndexes() { var list = MongoCache.GetTreeNodes().Where(node => node.PID == ID).ToList(); var indexes = new List <MongoIndexModel>(); foreach (var item in list) { indexes.Add(MongoCache.GetMongoObject(item.ID) as MongoIndexModel); } return(indexes); }
public List <MongoFieldModel> GetFields() { var fieldNodes = MongoCache.GetTreeNodes().Where(n => n.PID == ID).ToList(); var list = new List <MongoFieldModel>(); foreach (var node in fieldNodes) { list.Add(MongoCache.GetMongoObject(node.ID) as MongoFieldModel); } return(list); }
/// <summary> /// 获取字段节点信息 /// </summary> /// <returns></returns> public List <MongoTreeNode> GetFieldNodes() { var fieldFiller = MongoCache.GetTreeNodes().Where(n => n.PID == Table.ID && n.Type == MongoTreeNodeType.TableFiller).First(); return(MongoCache.GetTreeNodes().Where(n => n.PID == fieldFiller.ID).ToList()); }