I have MVC5 project (web role and azure service ) which is working against local DB V11.0 and working fine,There is a way to create some script in the MVC(web role) or other place in the project which will create the DB automatically in azure ,Currelntly I have change the connection string to work with azure DB which I created manually in azure portal . if there is option please provide the steps and example...
我有MVC5项目(Web角色和azure服务),它正在对本地DB V11.0起作用并且工作正常,有一种方法可以在MVC(Web角色)或项目中创建数据库的其他位置创建一些脚本自动天蓝色,Currelntly我更改了连接字符串以使用我在azure portal中手动创建的azure DB。如果有选项请提供步骤和示例...
Thanks, Jhon
This is the SQL which created the azure & local DB
这是创建azure和本地DB的SQL
CREATE TABLE [dbo].[Config] (
[ID] INT IDENTITY (1, 1) NOT NULL,
[Name] NVARCHAR (50) NULL,
[Email] NVARCHAR (50) NULL,
[Description] NVARCHAR (50) NULL,
PRIMARY KEY CLUSTERED ([ID] ASC)
);
1 个解决方案
#1
0
Yes, create a Database project in your Solution. Then you compare local DB to your cloud DB or just publish the project and it will create tables, views, etc.
是的,在解决方案中创建一个数据库项目。然后,您将本地数据库与您的云数据库进行比较,或者只是发布项目,它将创建表,视图等。
#1
0
Yes, create a Database project in your Solution. Then you compare local DB to your cloud DB or just publish the project and it will create tables, views, etc.
是的,在解决方案中创建一个数据库项目。然后,您将本地数据库与您的云数据库进行比较,或者只是发布项目,它将创建表,视图等。