Using 2.6 with Adapter...
I have a database function - FnGetAdminListEntries which returns a table of primary keys. I'm wanting to build a query that includes results where a foreign key is in the result list from the function call.
Something like:
bucket.PredicateExpression.AddWithAnd(
and this is the SQL I want to build:
PatientEventFields.FkEventId IN (SELECT * FROM dbo.FnGetAdminListEntries("Param1", ...))
So, I've found the DbFunctionCall class and built is as follows:
var dbFnCall = new DbFunctionCall("dbo.FnGetAdminListEntries", new object[] {"Event", DBNull.Value, criteria.EventListCode});
BUT, I'm having trouble with the syntax of the rest of the code.
Help!
How do I reference the returned primary keys from the function?
Thanks,
Craig