title: What are alternatives to using IQueryable<T> in Repository Pattern?
body: <p>I am ASP.NET MVC newbie (but .NET experienced dev) and I am trying to learn how to properly set web application infrastructure. 
  Repository pattern is what I am copping these days and after reading dozens of blogs/articles/answers in the past few days I am still not sure how to use it the right way. I am learning from the <a href="https://rads.stackoverflow.com/amzn/click/com/1430242361" rel="nofollow noreferrer" rel="nofollow noreferrer">Pro ASP.NET MVC 4 Adam Freeman</a> and here is the code for repository interface based on this book:</p>
  
  <pre><code>public interface IRepository&lt;T&gt;
  {
      IQueryable&lt;T&gt; FindAll();
      IQueryable&lt;T&gt; Find(Expression&lt;Func&lt;T, bool&gt;&gt; predicate);
  
      void Add(T newEntity);
      void Remove(T entity);
  
      T FindById(long id);
  }
  </code></pre>
  
  <p>After more research online I realized that many people think that returning IQueryable from repository is bad practice and I can (mostly) understand why. However, I can't seem to find answer on what exactly is the alternative? I know about idea of having a custom repository, for each entity, that has specialized method for each possible query which would basically return IEnumerable and not IQueryable... but this just doesn't seem right to me (it's not elegant solution, too many code writing and possible code redundancy etc...). </p>
  
  <p>What are other alternatives?</p>