arpan shah
arpan shah

Reputation: 277

error 3027: No mapping specified for the following EntitySet/AssociationSet - sysdiagrams(deleted the sysdiagram table by mistake)

So my problem is, I added a extra column in My one of the table in database in SQL and i wanted to reflec that change in my MVC project. So what i usually do is update the model from the database and it works all the time.But this time it didnt worked so i thought let me delete the table from Project1Model.Store>Tables/Views from the EDMX Model Browser and then update the model from Database(which worked in past for me). But by mistake deleting the SessionDetail table i deleted the sysdiagram table from tables/Views.

Now i dont have sysdiagram table in my Tables/Views section but i can see that table in diagram and in EntityTypes. I tried generating model from databse but didnt worked. I dont want to create Database from Model because i know i deleted something from my model and dont want to effect my database which is fine(let me know if i am wrong this the right way).

I still get this error after built the solutions. Let me know how i can recreate the sysdiagram table in my Table/Views section.

Thanks in Advance. -Arpan

Upvotes: 4

Views: 6709

Answers (1)

Harry
Harry

Reputation: 1825

I had the same error and went to the .edmx and deleted the sysdiagram table and everything worked well.

I initially had been connected to a database that had a database diagram but later I connected to a copy of that database but without a diagram which I guess was the source of the problems.

So to conclude first check if you have a diagram in the db, if not either recreate it and update your model from db, alternatively completely delete sysdiagrm table from your model.

Upvotes: 0

Related Questions