On Sat, Aug 7, 2010 at 10:02 AM, Frans Bouma <[email protected]> wrote:
> so my _guess_ (but I'm not sure) is that
> IEnumerable<T>.Contains(val) isn't implemented in Steve's linq provider,
> but
> IQueryable<T>.Contains(val) is.
>
>
Too many words and we still waiting a test
Frans,
this is what we have in NHibernate's team implementation:
for CollectionContainsGenerator
SupportedMethods = new[]
{
ReflectionHelper.GetMethodDefinition(() =>
Queryable.Contains<object>(null, null)),
ReflectionHelper.GetMethodDefinition(() =>
Enumerable.Contains<object>(null, null))
};
and for CollectionContainsRuntimeHqlGenerator
public bool SupportsMethod(MethodInfo method)
{
// the check about the name is to make things a little be fasters
return method != null && method.Name == "Contains" &&
method.IsMethodOf(typeof(ICollection<>));
}
That is part of our DefaultLinqToHqlGeneratorsRegistry (that can
be overridden/extended through NH's configuration).
--
Fabio Maulo
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/nhusers?hl=en.