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.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With