<p>Considering the following architecture:</p>

<ul>
<li>a base object 'Entity'</li>
<li>a derived object 'Entry:Base'</li>
<li>and a further derived object 'CancelledEntry:Entry'</li>
</ul>

<p>In EntitySQL I can write the following: </p>

<pre><code>[...] where it is of (only MyEntities.Entry) [...]
</code></pre>

<p>to return only objects of type Entry and no Entity or CancelledEntry.</p>

<p>In linq to sql, the following command will return objects of type Entry and CancelledEntry. </p>

<pre><code>EntityContext.EntitySet.OfType&lt;Entry&gt;()
</code></pre>

<p>What is the syntax/function to use to return only objects of type Entry?</p>

Ok, I have found a partial solution:
```
```
EntityContext.EntitySet.OfType<Entry>().Where( obj => !(obj is CancelledEntry) )
```
```
This is quite awful however, since if I create a new derived object, I have to go in all the queries and specifically add a condition to remove it.
There has to be a better solution