RX Extension ToObservable() yields an exception when querying a nested IColletion
<p>I am just trying to get comfortable with using ef and rx. Unfortunately, I came across a problem I cannot solve. I have a test database for MySQL called <a href="https://dev.mysql.com/doc/world-setup/en/" rel="nofollow noreferrer">world.sql</a>. EF produced the following</p>
<pre><code>public worldEntities()
        : base(&quot;name=worldEntities&quot;)
    {
    }

    protected override void OnModelCreating(DbModelBuilder modelBuilder)
    {
        throw new UnintentionalCodeFirstException();
    }

    public virtual DbSet&lt;city&gt; city { get; set; }
    public virtual DbSet&lt;country&gt; country { get; set; }
    public virtual DbSet&lt;countrylanguage&gt; countrylanguage { get; set; }
</code></pre>
<p>I was now trying to compare &quot;simple&quot; Linq queries and the ToObservable() alternative which Rx provides. Using Linq I have the following query which works:</p>
<pre><code>var m = new worldEntities();
        var res = m.country.Where(e =&gt; e.countrylanguage.Any(i=&gt;i.Language.Equals(&quot;German&quot;))).Select(e =&gt; e.Name);
</code></pre>
<p>However I cannot figure out the Rx counterpart. If I try using the same approach</p>
<pre><code>var set = m.country.ToObservable();
        set.Where(e =&gt; e.countrylanguage.Any(i =&gt; i.Language.Equals(&quot;German&quot;)))
            .Select(e =&gt; e.Name).Buffer(50).
            Subscribe(l=&gt;
            Items.AddRange(l));
</code></pre>
<p>I will get an Exception with the following inner message:</p>
<pre><code>{&quot;There is already an open DataReader associated with this Connection which must be closed first.&quot;}
</code></pre>
<p>So my question is, how should the RX query look like, to achieve the same results.</p>
<p>Thanks in advance and kind regards.</p>