Reputation: 12609
I have an EF model in a .NET 4.0 MVC Razor application. I'm pulling in a bunch of tables from a SQL Server database. Everything works fine except 1 table never gets pulled in. When I click "Update Model from Database" I can see the table on the "Add" tab, and it's selected, but nothing happens when I click Finish. The table itself isn't particularly complicated:
CREATE TABLE [dbo].[Rpt4bAuthorizations]
(
[LOB] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Employer] [varchar] (64) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[service_yearmo] [int] NULL,
[Date] [datetime] NULL,
[AuthType] [varchar] (255) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[Auth_Total] [int] NULL,
[Auth_Approved] [int] NULL,
[Auth_Denied] [int] NULL,
[MemberMonths] [numeric] (38, 1) NULL
) ON [PRIMARY]
Any idea what would cause one table not to be generated? If I can't get "Update Model from Database" to pull it in, can it be done manually?
Upvotes: 2
Views: 243
Reputation: 632
From what I can tell, that table does not have a primary key. That may be what is causing your problem.
Upvotes: 2