如何从存储过程插入表(用户定义类型)并传递给c#
表结构:
CREATE TABLE [dbo].[RegisterChoiceUserInitial](
[RegisterChoiceUserInitialID] [int] IDENTITY(1,1) NOT NULL,
[UserId] [uniqueidentifier] NOT NULL,
[RegisterChoiceUserInitialJob] [nvarchar](50) NULL,
[RegisterChoiceUserInitialOrganization] [nvarchar](50) NULL,
[RegisterChoiceUserInitialUnit] [nvarchar](50) NULL,
[RegisterChoiceUserInitialMembershipType] [nvarchar](50) NULL,
[RegisterChoiceUserInitialStart] [nvarchar](10) NULL,
[RegisterChoiceUserInitialEnd] [nvarchar](10) NULL,
CONSTRAINT [PK_RegisterChoiceUserInitial] PRIMARY KEY CLUSTERED
(
[RegisterChoiceUserInitialID] ASC
)
用户自定义类型:
CREATE TYPE [dbo].[TableTypeInitial] AS TABLE(
[ID] [int] NULL,
[InitialJob] [nvarchar](50) NULL,
[InitialOrganization] [nvarchar](50) NULL,
[InitialUnit] [nvarchar](50) NULL,
[InitialMembershipType] [nvarchar](50) NULL,
[InitialMembershipStart] [nvarchar](10) NULL,
[InitialMembershipEnd] [nvarchar](10) NULL
)