title: Cannot implicitly convert type when using generics
body: <p>I am trying to set a value on a base class but am getting the error:</p>
  
  <blockquote>
    <p>Cannot implicitly convert type <code>'PersonService'</code> to
    <code>'IMyInterface&lt;IEntity&gt;'</code>. An explicit conversion exists (are you
    missing a cast?)</p>
  </blockquote>
  
  <p>When I try to create my <code>PersonService()</code> it does implement <code>IMyInterface&lt;Person&gt;</code>. Person implements <code>IEntity</code> so I can't work out why it is not working.  </p>
  
  <pre><code>public interface IEntity { }
  public class Person : IEntity { }
  public interface IMyInterface&lt;T&gt; where T : IEntity { }
  public class PersonService : IMyInterface&lt;Person&gt; { }
  public abstract class Model : IEntity
  {
      public IMyInterface&lt;IEntity&gt; DataService { get; set; }
  }
  public class Test : Model
  {
      public Person Person { get; set; }
      public Test() : base()
      {
          DataService = new PersonService();
      }
  }
  </code></pre>