**
I can generate the following SQL:
[dbo].[CategoryMatch]([CategoryId], ???) = 1
With the following LINQ generator:
treeBuilder.Equality(treeBuilder.MethodCall("[dbo].[CategoryMatch]", new[] {
visitor.Visit(arguments[0]).AsExpression(),
visitor.Visit(arguments[1]).AsExpression()}), treeBuilder.Constant(1));
However I've found this doesn't perform aswell as saying:
[CategoryId] IN (SELECT [Id] FROM [dbo].[GetCategories](???))
I managed to come up with the following:
treeBuilder.In(
visitor.Visit(arguments[0]).AsExpression(),
treeBuilder.SelectFrom(
treeBuilder.From(
treeBuilder.Range(
treeBuilder.MethodCall("[dbo].[GetCategories]", new[] {
visitor.Visit(arguments[1]).AsExpression()
}).AsExpression(),
treeBuilder.Alias("c")
)
)
));
But this gives the error:
Specified method is not supported.
I'd appreciate if show me how this can be done. Thanks
--
You received this message because you are subscribed to the Google Groups
"nhusers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/nhusers?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.