Question

How can I make use of TableTypes in Simple.data for following query:

//Type -MyType
GId int
StartDate datetime
EndDate datetime

//Table - MyTable
Id int
GId int
Text varchar
StartDate Datetime
EndDate Datetime

Select * from MyTable T1 inner join MyType T2 on T1.GID = T2.GID
and T1.StartDate between T2.StartDate and T2.EndDate
and T1.EndDate between T2.StartDate and T2.EndDate
Was it helpful?

Solution

To my knowledge, none of the Simple.Data providers support a TableType. The standard fallback if you want use them would be to write a stored procedure that uses them. You then run the sproc through Simple.Data.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top