<p>Here's the code that I'm attempting to do:</p>

<pre><code>public IList&lt;IOperator&gt; GetAll()
{
      using (var c = new MyDataContext())
      {
          return c.Operators.ToList();
      }
}
</code></pre>

<p>Operator implements IOperator, but I'm getting the following compilation error:</p>

<pre><code>Cannot implicitly convert type 'System.Collections.Generic.List&lt;MyProject.Core.Operator&gt;' to 'System.Collections.Generic.IList&lt;MyProject.Core.Model.IOperator&gt;'. An explicit conversion exists (are you missing a cast?)
</code></pre>

<p>How do I cast this to get what I need?</p>

Try the
```
Cast<>()
```
method:
```
```
return c.Operators.Cast<IOperator>().ToList();
```
```