User-252718598 posted
condition:
1. EF 6.0 used
2. Code first used.
detials:
I use code first to insert a data to the DB, no any exception throws(I make sure). then I select the data inserted just before, but no data shows in DB(select * from XXX)。
then I use sql profiler to monitor the sql which created by EF, Curiously,
the sql catched, but no data was inserted successfully.
PS: But It's ok while executing the sql catched manually.
the sql I cathched as below:
exec sp_executesql N'INSERT [dbo].[T_TempBookChapter]([bookID], [fileName], [chapterName], [source], [thirdChapterID], [charNum], [status], [orderID], [hasSensitiveKey], [avgPrice], [price], [isPushed], [isBought], [isSynchroToOnline], [expectedPusheDate], [CreateTime], [UpdateTime], [CancelTime])
VALUES (@0, @1, @2, @3, NULL, @4, @5, @6, @7, @8, @9, @10, @11, @12, @13, @14, NULL, NULL)
SELECT [ID]
FROM [dbo].[T_TempBookChapter]
WHERE @@ROWCOUNT > 0 AND [ID] = scope_identity()',N'@0 int,@1 nvarchar(max) ,@2 nvarchar(max) ,@3 nvarchar(max) ,@4 int,@5 int,@6 int,@7 int,@8 decimal(18,2),@9 decimal(18,2),@10 bit,@11 bit,@12 bit,@13 datetime2(7),@14 datetime2(7)',@0=1046265,@1=N'1046265_201606021635290777_3139_1.txt',@2=N'正文 第446章 从此,不再做软弱的尹月溪!',@3=N'海外Q阅读',@4=2123,@5=1,@6=1,@7=0,@8=0,@9=0,@10=0,@11=1,@12=0,@13='1900-01-01 00:00:00',@14='2016-06-02 16:35:29.0537696'
who can tell me why?
thanks for you in advanced!!!