我有這個存儲過程:INSERT使用LIST到存儲過程
CREATE PROCEDURE [RSLinxMonitoring].[InsertFeatures]
@Features nvarchar(50),
@TotalLicenses int,
@LicensesUsed int,
@ServerName nvarchar(50)
AS
SET NOCOUNT ON
INSERT INTO [RSLinxMonitoring].[FeatureServer]
([Features]
,[TotalLicenses]
,[LicensesUsed]
,[Server])
VALUES(@Features
,@TotalLicenses
,@LicensesUsed
,@ServerName)
它能正常工作,但因爲我需要插入退出從我的C#的LINQ到SQL類了一下,我想從我的應用程序中插入一個列表來代替,這可能嗎?
我已經看到它已經完成,然後使用SELECT
聲明,但沒有使用INSERT
時。
更新: 由於LINQ to SQL不支持用戶定義的表類型我不能表。 :(
你有沒有在存儲過程中聽到表類型參數的?如果你不想使用ORM考慮傳遞表類型參數 – Ehsan
#Ehsan Ullah看起來interresting。但是我是否需要遍歷列表,以及應用程序發送什麼類型? – mortenstarck
看到我的回答如下 – Ehsan