+1

On Sun, Jan 25, 2009 at 9:38 AM, Davy Brion <[email protected]> wrote:

> Hey guys,
>
> the new Future feature we have is great, but from a syntax pov, it's only
> great for enumerable results.  When using it with scalar values or when you
> need to retrieve one specific entity it's a bit awkard to just get the first
> element from the returned IEnumerable<T> instance.
>
> So i added a FutureValue<T> method to ICriteria which works exactly the
> same as the Future<T> method does, except that it returns an IFutureValue<T>
> instance instead of an IEnumerable<T> instance.  The IFutureValue<T>
> interface merely defines a Value getter.  When calling the Value property it
> returns the single value that you want, and if necessary will also fetch the
> results of the other Future queries.
>
> I haven't committed this yet, because i wanted to know if anyone had any
> objections to this.  You can look at the attached patch for the
> implementation.
>
> So if there are no objections, i'll commit this to the trunk.
>
> --
> Davy Brion
> http://davybrion.com
>

Reply via email to