I've done the following steps:
- Open visual studio
- Create new item
- Select "ADO.Net Entity Data Model"
- Point it to an existing database
- Accept all the defaults.
- It then adds a "Model1.edmx" file to my solution and the corresponding "Model1.Designer.cs" file.
However in the output I get the following error:
"ERROR: Unable to generate model because of the following exception: 'Value does not fall within the expected range.'."
I've created a model from this database before so I dont think the error is a result of complex table design (which it's not).
Has anyone else hit this error?
I had a similar problem. The reason was pretty simple. I've forgotten to set a primary key in one of my tables. Hope it helps.