How To Find data by passing List of IMongoQuery
<p>Below is my code where i am passing List showing no error during building solution but during run time its showing error.</p>

<pre><code>An Array value cannot be written to the root level of a BSON document.
</code></pre>

<p>My Code Is :</p>

<pre><code>public IQueryable&lt;Folder&gt; GetFolderByIdList(List&lt;IMongoQuery&gt; GraphIdList)
        {
            if (ApplicationDbContext.ServerIsDown) return null;
            _FolderList.Clear();
            if (!GraphIdList.Any())
            {
                return null;
            }
            var FolderData = db.Folder.Find(GraphIdList.ToBsonDocument()).ToList();
            if (FolderData.Count() &gt; 0)
            {
                foreach (Folder item in FolderData)
                {
                    _FolderList.Add(item);
                }
            }
            var result = _FolderList.AsQueryable();
            return result;
        }
</code></pre>

<p>and below is my code what i have pass in GraphIdList</p>

<pre><code>var UserFilesData = planetDriveObj.GetFilesOfFolder(
            Query.And(
              Query&lt;UserFiles&gt;.EQ(u =&gt; u.CreatorUserID, userInfoId), 
              Query&lt;UserFiles&gt;.Matches(u =&gt; u.Title, fileTitle)));

                foreach(var c in UserFilesData.ToList())
                {
                    idList.Add(Query.And(
                       Query&lt;Graph&gt;.EQ(u =&gt; u.GraphID, c.GraphID),
                       Query&lt;Graph&gt;.EQ(u =&gt; u.isHidden, true)));
                }

                var GraphData = GraphRepObj.getGraphDataBYIdList(idList);
</code></pre>