开发者

(subsonic) problem with deleting rows (my table contains Deleted column)

开发者 https://www.devze.com 2023-02-21 02:27 出处:网络
I have a table named \'Test\' contains i开发者_开发知识库d int name nvarchar Deleted bit columns.

I have a table named 'Test' contains

columns.

First i install subsonic in my project using sql server 2000. where i try to delete some rows, it throw object null exception for me on line:

repo.Update(); //object reference not set to...

I config subsonic again with sql server 2008, Now when i try to delete row, it work fine! even when i change connection string to sql 2000.

But my current problem is:

When i try to delete some rows that does not exists with lambda expression like below it threw a new exception:

Test.Delete(a=>a.id==100); //it doesn't exists!
//...
repo.Update();
//ExecuteNonQuery: CommandText property has not been initialized

I use VS2008, sql2008 & sql2000 and subsonic 3.0.0.4

0

精彩评论

暂无评论...
验证码 换一张
取 消