Miguel
Miguel

Reputation: 1177

Entity Framework - Add Existing Database

I'm trying to add a database using the Entity Data Model Wizard and keep on getting an error "An Item with the same key has already been added."

EF Designer from Database > New Connection > Error

VS Error

This is a new connection that I'm working with. Where can I view what keys are entered?

Upvotes: 2

Views: 673

Answers (2)

Vivian River
Vivian River

Reputation: 32390

Make sure that what you key in for "Save connection settings in Web.Config" is unique. You can browse the web.config file to see what connections you've already saved.

Upvotes: 2

Hasan Hasanov
Hasan Hasanov

Reputation: 1159

I had the same problem a while ago and found out that I have model with the same property twice. Just rename that property and it should work fine.

Upvotes: 2

Related Questions