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.
Deploy DB to azure from VS
-
21-06-2023 - |
سؤال
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...
Thanks, Jhon
This is the SQL which created the azure & local DB
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)
);
المحلول
لا تنتمي إلى StackOverflow