我正在尝试将旧网站转换为使用 ASP.Net 4.5 和 EF5 Code First,但是旧网站中有一个表我无法弄清楚如何转换,因为它有两列都引用了父表中的同一列. 谁能帮我转换这张表?
CREATE TABLE dbo.tblCollectionsList
(
ListID smallint IDENTITY(0,1) NOT NULL,
SectionID smallint NOT NULL,
IncludedSectionID smallint NOT NULL,
CONSTRAINT PK_CollectionsList_ListID PRIMARY KEY CLUSTERED (ListID ASC),
CONSTRAINT FK_CollectionList_SectionInfo FOREIGN KEY (SectionID) REFERENCES dbo.tblSectionInfo (SectionID),
CONSTRAINT FK_CollectionList_SectionInfo2 FOREIGN KEY (IncludedSectionID) REFERENCES dbo.tblSectionInfo (SectionID)
)