问题
Is there as way to create database diagram in Visual Studio as a Sql Server Project?
I know it is possible to do it in sql server management studio, but I am also wondering if it is possible to do in Visual studio.
回答1:
As per MSDN (https://msdn.microsoft.com/en-us/library/y5a4ezk9.aspx) the Visual Database Designer was deprecated in Visual Studio 2013. If you're using an older version of Visual Studio, note that support for the design tool within Visual Studio stops at SQL Server 2008 R2. (See "Important" box on top of page at https://msdn.microsoft.com/en-us/library/ms171976.aspx )
The short answer: no.
回答2:
Actually there are two ways that i know In Visual Studio.
Add to project
ADO.NET Entity Data model. It creates for you a.edmxfile which contains a tables with relation. More info MSDN. It also install Entity framework.Open
Server explorer>Connection to Database. Select Microsoft SQL Server, Server name=.; (or your PC name) and then choose your database schema.You can check this video.
I hope it helps you.
来源:https://stackoverflow.com/questions/36655408/visual-studio-2015-sql-server-project-database-diagram