title: Resolve Ambiguity in Interface based approach
body: <p>I tried below Repository Pattern implementation</p>
  
  <pre><code>interface IRepository&lt;T&gt;
  {
      IQueryable&lt;T&gt; All { get; }
      T Find(object id);
      void Insert(T model); 
  }
  </code></pre>
  
  <p>Then i have IAdminRepository defined below</p>
  
  <pre><code>interface IAdminRepository : IRpository&lt;Role&gt;, IRepository&lt;User&gt;
  {
  }
  
  public class AdminRepository:IAdminRepository
  {
      IQueryable&lt;User&gt; IRepository&lt;User&gt;.All
      {
          get { throw new NotImplementedException(); }
      }
  
      User IRepository&lt;User&gt;.Find(object id)
      {
          throw new NotImplementedException();
      }
  
      void IRepository&lt;User&gt;.Insert(User model)
      {
          throw new NotImplementedException();
      }
  
      IQueryable&lt;Role&gt; IRepository&lt;Role&gt;.All
      {
          get { throw new NotImplementedException(); }
      }
  
      Role IRepository&lt;Role&gt;.Find(object id)
      {
          throw new NotImplementedException();
      }
  
      void IRepository&lt;Role&gt;.Insert(Role model)
      {
          throw new NotImplementedException();
      }
  }
  </code></pre>
  
  <p>In my business layer i use Interface based calling.</p>
  
  <pre><code>public interface IAdminService
  {
      bool CreateUser(User user);        
      List&lt;User&gt; GetAllUsers();
  }
  
  public class AdminService : IAdminService
  {
      private readonly IAdminRepository AdminRepository;
  
      public AdminService(IAdminRepository _adminRepository)
      {
          AdminRepository = _adminRepository;
      }
  
      public bool CreateUser(User user)
      {
          AdminRepository.Insert(user);
          return true;
      }
  
      public List&lt;User&gt; GetAllUsers()
      {
          return AdminRepository.All; // Here is error 
      }
  }
  </code></pre>
  
  <blockquote>
    <p>Error: Ambiguity between IRepository.All &amp;
    IRepository.All.</p>
  </blockquote>
  
  <p>How to resolve this? What is the problem with my approach of using Repository Pattern in this way?</p>