Is there any way to create diagram for localdb?
Asked Answered
K

3

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.

Kary answered 22/4, 2016 at 21:9 Comment(1)
If you specify v11.0 for local db, I find that you do get diagramming support.Tychonn
C
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.

Crocked answered 23/4, 2016 at 20:43 Comment(0)
B
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.

Beefwitted answered 16/3, 2021 at 10:28 Comment(0)
C
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.

Crocked answered 23/4, 2016 at 20:43 Comment(0)
H
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)

Harassed answered 22/4, 2016 at 21:46 Comment(3)
This backend version is not supported to design database diagrams or tables. (MS Visual Database Tools)Kary
Have you tried doing this outside of the MS Visual Database tools? I am refering to SQL Server Management Studio (SSMS) mssqltips.com/sqlservertip/1816/….Harassed
Please have a look at solutions proposed here: #25146974Harassed

© 2022 - 2024 — McMap. All rights reserved.