Hey, is it possible to use TVPs in LLBLGen yet? I know it wasn't back in v4. We're on v5.9.2 RTM.
When I tried to add the sproc it errored saying it couldn't determine the number of result sets as it was trying to use an nvarchar instead of the TVP.
I can't see any way in the designer to add a new type in either and there's no option in the sproc's type list for the TVP either. The TVP is this:
CREATE TYPE VersionKey AS TABLE
(
Id int NOT NULL,
VersionId int NOT NULL
)
The sproc is defined like this:
CREATE PROCEDURE GetSomeMagicalValue
@Keys VersionKey READONLY
AS
BEGIN
SET NOCOUNT ON;
-- Do something with @Keys
END
To get around this in the past I'd send through a CSV text string and split it on the SQL side, but ideally I want to pass through a number of objects instead like:
DataTable results = RetrievalProcedures.GetSomeMagicalValue(new VersionKey[] { new VersionKey(1,0), new VersionKey(2,10) });