Entity Model Issue: Not able to create model for one particular table
Asked Answered
N

2

13

While creating the entity model I am getting the following error .

Added the connection string to Web.Config.
Successfully registered the assembly 'System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' in Web.Config.
ERROR: Unable to generate model because of the following exception: 'Value does not fall within the expected range.'.
Loading metadata from database took 00:00:02.1203632.
Generating model took 00:00:00.8390920.
Writing out the EDMX file took 00:00:00.

All the tables are getting created but the BC_States table is not getting created.I can't understand why.

Norikonorina answered 4/2, 2010 at 12:20 Comment(0)
M
19

I've just been investigating a similar issue. It turns out that Entity Framework outputs additional error information in the Messages section of the Error List window in Visual Studio.

As you can see it's much more useful than the generic error that appears in the Output window. This was crucial in helping me to solve my problem.

enter image description here

Myrmidon answered 16/9, 2011 at 12:44 Comment(2)
Thanks for posting this, it would've taken me a bit to look at 'Messages' since it should really be put in 'Errors' IMHO.Sanjay
Agreed, I only looked after a lot of head scratching!Myrmidon
E
7

The question is not readable but I found the similar question at Ado.Net Entity Data Model Not Updating Correctly.

As for me (I had the same problem) the issue was because of there was no primary key set on one of the tables.

Enough answered 4/3, 2010 at 21:44 Comment(1)
That was my issue as well. Just altered the table and I can import the table just fine.Untinged

© 2022 - 2024 — McMap. All rights reserved.