2
(不能用它作爲標籤,但我們使用BLToolkit作爲ORM)BLToolKit節省空,而不是0
我有這個奇怪的問題,即在BLToolkit我們的數據庫中保存的NULL而不是0。
如果您看圖像,這是我的值將被保存。 (gIdx代表GroupIndex)
以下是數據庫中的結果。如果您查看GroupIndex列,我只有1和2.(此事也發生在SortIndex列中)
這是我的存儲過程。 INT只是一個NULL,INT
USE [ASTUSADMINISTRATION]
GO
/****** Object: StoredProcedure [dbo].[stpr_GridColumnLayout_Update] Script Date: 2015-06-22 08:08:28 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[stpr_GridColumnLayout_Update]
@ID AS [usrID],
@Width AS int,
@Index AS int,
@IsCellMerged AS [usrBoolean],
@GroupIndex AS int,
@SortIndex AS int,
@SortDirectionType AS int,
@SummaryItemType AS int,
@UpdatedDate AS datetime OUTPUT,
@UpdatedUser AS [usrUsername]
AS
BEGIN
SET NOCOUNT ON
SET @UpdatedDate = GETDATE()
-- Vérifier si c'est un groupe système
UPDATE [dbo].[GridColumnLayout] SET
[Width] = @Width,
[Index] = @Index,
[IsCellMerged] = @IsCellMerged,
[GroupIndex] = @GroupIndex,
[SortIndex] = @SortIndex,
[SortDirectionType] = @SortDirectionType,
[SummaryItemType] = @SummaryItemType,
[UpdatedDate] = @UpdatedDate,
[UpdatedUser] = @UpdatedUser
WHERE [GridColumnLayoutID] = @ID
END
這不是一個答案,但謝謝。我在BLToolkit模塊中發現了這個問題,並在GitHub上創建了一個問題。它已於7月27日確定。 –
我很抱歉給你一個無答案。很高興你能弄明白。 –