Accessing on first element inside collection
<p>If I'm sending object named Property which have Photos collection when I'm need only first element from that Photos collection like this, does this approach load all elements from collection and than assoc. only first like I want, or is this approach the one I need, first load from collection.</p>

<pre><code>public PropertyHPViewModel(Property x)
{
    Id = x.Id;
    Created = x.Created;
    Title = x.Title;
    Photo = x.Photos.First();
}
</code></pre>

<p>Generated Sql from profiler</p>

<pre><code>SELECT photos0_.PropertyId    as PropertyId1_,
       photos0_.Id            as Id1_,
       photos0_.Id            as Id1_0_,
       photos0_.ImageData     as ImageData1_0_,
       photos0_.ImageMimeType as ImageMim3_1_0_,
       photos0_.PropertyId    as PropertyId1_0_
FROM   Photo photos0_
WHERE  photos0_.PropertyId = 129 /* @p0 */
</code></pre>

<p><strong>Updated</strong>
Since I have 20 of this generated queries all differeted only in last line </p>

<p><code>WHERE  photos0_.PropertyId = xxx /* @p0 */</code></p>

<p>where the number is photo id object, I must add that I have SELECT N+1 ALERT on this queries according to nhibernate profiler.</p>
