Return an IEnumerable<T> or List<T> from library
<p>I'm designing a library that connects to a data source (similar to a DB) and returns various POCO objects.</p>

<p>I'm using the datasource vendors .NET library to make the connection (and retrieve the objects), which I'm then converting into my much lighter POCO objects. To build these POCO objects, I have a static method on each POCO class (<code>.FromDBObject(DBObject obj)</code> that takes the DB object and returns a new POCO instance.</p>

<p>The initial connection to the DB isn't fast so it's not something I want to be doing on the fly (per POCO build), so I'm wrapping a library around it that manages the connection to limit this slowdown, as well as dispose of the connection correctly.</p>

<p>As part of this library, I have a number of methods that return lists of my POCO's. One 'oddity' of the DB objects is that they aren't loaded into memory when the vendor library loads them, they require an open connection to load their data.</p>

<p>As a result, if I return an <code>IEnumerable&lt;POCO&gt;</code> then it's possible that the connection could be closed (time/dispose) before this has been enumerated, thus crashing when creating the POCO's.</p>

<p>So a long set up for a short question.</p>

<ol>
<li>Should I return <code>IEnumerable&lt;POCO&gt;</code> but in the actual method perform a <code>.ToList()</code> to force the instantiation or should I specify the return type as <code>List&lt;POCO&gt;</code>?</li>
</ol>
