Has anybody experimented with these. Is this supported?
Table Value parameters aren't supported yet in LINQ to SQL. There's a few posts about this on Microsoft's MSDN forums:
DbType.Structured not available
SQL Server 2k8.User Defined Table Type. Mapping between DbType 'Structured' and Type 'System.Object'
The second link refers to Entity Framework, but the underlying issue is the same.
I actually had to try this myself. :0
It does not seem to be supported. I get this error when adding a stored procedure using a tvp parameter into the dbml file
DBML1005: Mapping between DbType 'Structured' and Type 'System.Object' in Parameter 'TVP' of Function 'dbo.spTestTableTypeParm' is not supported
Sad but true, I thought this could be a killer feature of sql 2008 and linq2sql
来源:https://stackoverflow.com/questions/338029/sql-server-2008-table-valued-parameters-linq2sql