Linq to sql LINQ Clear()don';t从数据库中删除行

Linq to sql LINQ Clear()don';t从数据库中删除行,linq-to-sql,Linq To Sql,我有一个db表,如下所示: CREATE TABLE ItemPrice ( [Identity] INT IDENTITY, Item_FK INT NOT NULL REFERENCES Item([Identity]), PriceList_FK INT NOT NULL REFERENCES PriceList([Identity]), Price FLOAT NOT NULL, PR

我有一个db表,如下所示:

CREATE TABLE ItemPrice
(
    [Identity]    INT    IDENTITY,
    Item_FK       INT    NOT NULL   REFERENCES Item([Identity]),
    PriceList_FK  INT    NOT NULL   REFERENCES PriceList([Identity]),
    Price         FLOAT  NOT NULL,
    PRIMARY KEY ([Identity])
)
Database.Accounting.ItemPrices.DeleteAllOnSubmit(Current.ItemPrices);
如果我在linq上下文中使用
Clear()
在我的
PriceList
实例中,其中
Current
PriceList

Current.ItemPrices.Clear();
ItemPrice
中的项目不会被删除
PriceList\u FK
仅设置为
NULL
,然后数据库在
非NULL
上发生冲突


如何强制数据库删除所有行。

我所做的只是在表本身上调用remove,而在引用对象上调用remove,如下所示:

CREATE TABLE ItemPrice
(
    [Identity]    INT    IDENTITY,
    Item_FK       INT    NOT NULL   REFERENCES Item([Identity]),
    PriceList_FK  INT    NOT NULL   REFERENCES PriceList([Identity]),
    Price         FLOAT  NOT NULL,
    PRIMARY KEY ([Identity])
)
Database.Accounting.ItemPrices.DeleteAllOnSubmit(Current.ItemPrices);
(记帐是Linq数据上下文)