0
我想從我的數據庫添加一個表到我的LINQ to SQL數據上下文。它不會讓我。在visual studio的設計器中查看錶格看來,它不會將Id識別爲主鍵。我看不出桌子有什麼問題。任何想法,將不勝感激。將表添加到LINQ to SQL數據上下文
這是我的表;
USE [fldt_bt_wbc]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[btRequests](
[ID] [int] IDENTITY(1,1) NOT NULL,
[UserID] [varchar](25) NOT NULL,
[RequestType] [int] NOT NULL,
[DateTime] [datetime] NOT NULL,
[Status] [varchar](20) NULL,
[ConversationID] [varchar](50) NULL,
CONSTRAINT [PK_btRequests] PRIMARY KEY CLUSTERED
(
[ID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
ALTER TABLE [dbo].[btRequests] WITH CHECK ADD CONSTRAINT [FK_btRequests_RequestType] FOREIGN KEY([RequestType])
REFERENCES [dbo].[RequestType] ([ID])
GO
ALTER TABLE [dbo].[btRequests] CHECK CONSTRAINT [FK_btRequests_RequestType]
GO
什麼是確切的消息? –
沒有消息。當我嘗試將表拖入設計器光標變成一個十字的圓。 –
只讀設計器文件?在黑暗中刺傷,真的 – Vedran