title: Why GenericRepository returns a class while I'm using interfaces with dependency injection?
body: <p>I'm developing an ASP.NET MVC 5 Web API with C#, .NET Framework 4.5, Entity Framework 6.1.0 <strong>Code First</strong> and <code>Ninject</code>.</p>
  
  <p>To do it I'm using <strong>Generic Repository</strong>, <strong>Unit of Work</strong> and <strong>Dependency Injection</strong> patterns (at least, I'm trying to follow them).</p>
  
  <p>I have the following projects:</p>
  
  <ul>
  <li><p>MyProduct.Domain</p></li>
  <li><p>MyProduct.Interfaces</p></li>
  <li><p>MyProduct.WebAPI</p></li>
  </ul>
  
  <p>On <code>MyProduct.Interfaces</code> I have two interfaces:</p>
  
  <ul>
  <li>IGenericRepository</li>
  <li>IUnitOfWork</li>
  </ul>
  
  <p>On <code>MyProduct.Domain</code> I have three folders:</p>
  
  <ul>
  <li><code>Concrete</code> with the classes: <code>EFDbContext</code>, <code>GenericRepository</code>
  (implements <code>IGenericRepository</code>) and <code>UnitOfWork</code> (implements
  <code>IUnitOfWork</code>).</li>
  <li><code>Configurations</code> with EF Code First configurations.</li>
  <li><code>Entities</code> with the classes representing database tables.</li>
  </ul>
  
  <p>This is my <code>IUnitOfWork</code> interface:</p>
  
  <pre><code>public interface IUnitOfWork
  {
      void SaveChanges();
      IRepository CustomerRepository { get; }
      IRepository ProductRepository { get; }
      IRepository OrderRepository { get; }
  }
  </code></pre>
  
  <p>And a controller with constructor injection:</p>
  
  <pre><code>private IUnitOfWork unitOfWork;
  
  public OrderController(IUnitOfWork unitOfWork )
  {
      this.unitOfWork = unitOfWork;
  }
  </code></pre>
  
  <p>And now my problem:</p>
  
  <p>If I get all Customers with <code>UnitOfWork.CustomerRepository.GetAll();</code>.</p>
  
  <p>This will return a <code>IEnumerable&lt;Customer&gt;</code> and <code>Customer</code> its defined in <code>MyProduct.Domain</code>. Is that correct?</p>
  
  <p>I'm trying to decouple any Entity Framework reference on <code>MyProduct.WebApi</code>, but If I have to add a reference to <code>Customer</code> (defined in <code>MyProduct.Domain</code>, folder <code>Entities</code>) I'm not decoupling anything because I'm referencing <code>MyProduct.Domain</code> project.</p>
  
  <p>Maybe I haven't understood anything here because I don't understand why I'm using <code>IUnitOfWork</code> interface and then on any action of my controller I have an instance of a class from <code>MyProducts.Domain</code>.</p>
  
  <p>Do I need to move my entities to another project called, for instance, <code>MyProduct.Model</code>?</p>