title: EF ICollection Vs List Vs IEnumerable Vs IQueryable
body: <p>so, my EF model has relationships and according to what I have seen in examples, those relationships should be done with virtual properties of ICollection.</p>
  
  <p>Example:</p>
  
  <pre><code> public class Task
      {
          public int Id { get; set; }
          public string Description { get; set; }
          public virtual ICollection&lt;SubTask&gt;  { get; set; }
      }
  </code></pre>
  
  <p>I read somewhere that I should use IEnumerable to prevent deferred execution, is that correct? It means that if my DAL methods return IEnumerable, still of IQueryable, the SQL will be executed at that moment, and not at the moment when I call .TOList in the web page.</p>
  
  <p>So, what is the best practice?  What should I return? IEnumerable, List?, IList, ICollection?</p>
  
  <p>thx</p>