6

I have created a database using Entity Framework code first approach, and now I am trying to verify the relations of data tables but unfortunately after wasting 2 days still unable to get any solution.

Janis S.
  • 2,526
  • 22
  • 32
Muhammad Taha
  • 212
  • 3
  • 11

3 Answers3

5

According to this article the following query solves the problem.

alter authorization on database::[your-db-name-no-quotes] to sa

I tried it and it worked for me.

Ayman Sharaf
  • 889
  • 2
  • 10
  • 18
4

You might try to use Entity Framework Power Tools that is a Visual Studio add-in that was used to create the data model diagrams shown in these tutorials. The tools can also do other function such as generate entity classes based on the tables in an existing database so that you can use the database with Code First. After you install the tools, some additional options appear in context menus. For example, when you right-click your context class in Solution Explorer, you get an option to generate a diagram. When you're using Code First you can't change the data model in the diagram, but you can move things around to make it easier to understand.

Murat Yıldız
  • 11,299
  • 6
  • 63
  • 63
1

There is a possibility to create a diagram from an existing database. You could use SQL Server Management Studio Express diagram generator. Right-click in diagrams folder in the database and choose create a new diagram. Please also refer to this answer: Generate table relationship diagram from existing schema (SQL Server)

Community
  • 1
  • 1
Janis S.
  • 2,526
  • 22
  • 32
  • This backend version is not supported to design database diagrams or tables. (MS Visual Database Tools) – Muhammad Taha Apr 23 '16 at 11:52
  • Have you tried doing this outside of the MS Visual Database tools? I am refering to SQL Server Management Studio (SSMS) https://www.mssqltips.com/sqlservertip/1816/getting-started-with-sql-server-database-diagrams/. – Janis S. Apr 23 '16 at 12:07
  • Please have a look at solutions proposed here: http://stackoverflow.com/questions/25146474/the-backend-version-is-not-supported-to-design-database-diagrams-or-tables – Janis S. Apr 23 '16 at 13:55