How to publish web MVC (EF-database first)? - entity-framework

I have read many document about publish web MVC. Almost is about publish MVC-EF(code first) to Azure.
So, what about MVC-EF(database first) ?
It had better not to Azure ( Example: www.gearhost.com)

Hence your service provider is Gearhost,you can follow below mentioned steps.
How to publish your app from Visual Studio
Publishing your application from Visual Studio is simple and easy with
GearHost regardless of your Visual Studio version.
Download the publishing file
We make it easy to publish from Visual Studio by providing you a fully
encapsulated publishing file that you will import into Visual Studio.
To get this file you will need to:
Log in to your GearHost account Click the CloudSite name you want to
upload your application to Click the Publish tab Click the Visual
Studio button under the Application Publishing Files heading This will
download a {cloudsitename}.publish file to your local computer
storage.
Publishing
Launch Visual Studio and open your existing web application project
Right click on your web application and select Publish Web App
In the Publish wizard window select Profile and select Import under
the Select a publish target menu
Browse to the {cloudsitename}.publish file you downloaded above and
select OK
Click the Publish button
Here is the Link : How to publish your app from Visual Studio
How to create a database
You can create a MSSQL (Microsoft SQL) or MySQL database on your
account using the simple steps below. To restore a database from a
backup view the How to restore a database doc.
To create a database:
Log in to your GearHost Account
Click the Databases menu
Click the Create Database button
Enter a desired database name
Select the database Plan and Type
Click the Create Empty Database button to complete
Connect to your database:
Congrats you now have a new database! To connect to your MSSQL
database view the How to connect to a MSSQL Database doc. To connect
to your MySQL database view the How to connect to a MySql Database
doc.
Here is the Link : How to create a database

Related

How to add files and folders to an Azure Web App from within Visual Studio Code

I installed the Azure extension to my Visual Studio Code and connected to my Azure Web App and I can open and edit files from my Azure Web App within Visual Studio Code without problem. What I am struggling with is how to add files and folders to my Azure Web App within VS code.
I can create a new file in VS code, but I cannot find a way to make this new file part of my Web App.
Also, dragging files from a file explorer in Windows into the Azure Web App within VS code does not work.
Is there a way to create/delete/move files and folders inside the files section of an Azure Web App that is shown in the Azure extension in VS code?
I tried to find an answer in Youtube/Google/stackoverflow but did not find a relevant solution that is applicable to my problem.
It would be great if someone could show how to manage files and folders within an Azure Web App that is open in the Azure extension of VS code to a level of detail that shows in very detail what to click/add (step by step since I do not have much experience)
Created and deployed Azure App service from VSCode.
Tried to add the new file / folder in VSCode and deployed to same AppService once again.
Local folder
Unable to see the newly created files.
Deployed App Folder
You can directly add, edit or delete files/folders in Azure Web App from Azure Portal.
Navigate to the KUDU Console
URL : https://YourWebAppName.scm.azurewebsites.net/DebugConsole
or
you can open KUDU console from
Azure Portal => YourWebApp => Advanced Tools => Go => Debug Console => CMD
We have an option to create New Folder / File directly.

I don't see Programmability folder in Azure Data studio

This problem is going me crazy!. Azure Data Studio doesn't show me the folder where stored procesures are located. I checked my permissions and I have it because with pgadmin client I can see the folder. Will it a Bug?. Any idea?.
1.- UI Of Azure Data Studio
2.- UI PGAdmin
Thanks!

MySQL database setup for blog created by ghost CMS

I'm new to Ghost CMS it uses SqlLite db by default and I am using Editorial theme for my blog/ website and I want use MySQL database for my blog/ website which is created by Ghost CMS
I need step by step procedures to change SqlLite db to Mysql db
https://www.fastcomet.com/tutorials/ghost/configure-mysql-database
referred this link but I didn’t get How to setup DB
I need to create a blog/website using GhostCMS which has MySql db
If you want to migrate your contents to MySQL,
Login to ghost dashboard.
Go to Settings -> Labs -> Migration options and click Export. This will export the contents of your blog.
Make a new installation of Ghost with ghost install.
Provide your MySQL connection credentials.
Login to the new installation of ghost and under Settings -> Labs -> Migration
options, click Import and select the export file downloaded in
step 2.
You may need to copy the contents (Contains images and other uploads) folder to the new installation.

Windows Azure publish profile not updating database

I'm using Windows Azure to host an ASP.NET MVC4 web application. I want to use database first-programming, and followed this tutorial to create a database and data model.
I then created a website with a linked database in Windows Azure. I downloaded the publish profile and imported it through VS2012 into the project. I noticed that the database connection strings were not included, so I collected it from the database created in Azure.
In the publish wizard under tab "Settings" I was able to to check a box called "Update database" and when I published the website for the first time, everything went perfect and the website and database was uploaded.
Then I did some changes to the database, updated the data model as described in above mentioned tutorial, updated my code and built the project. This time, when I entered the Publish wizard and selected the "Settings" tab, I am no longer able to check the "Update database" checkbox. Instead there is a disabled checkbox called "Execute Code First Migrations (runs on application start)".
Why can I no longer select the "update database" checkbox? Do I have to update the database manually from now? I tried to create the datamodel again, but it did not help.
This is a completely normal behavior. You set that option for the first time and on successive deployments the code-first migrations will take place on application start. EF (Entity framework) will start the Code-First migrations then.
Especially when you update your model manually.
You will not have to update your database manually. It will be done on application start. When your web-app is started, if you select the migration option.
Read more in detail here:
EF Code First Migrations Deployment to an Azure Cloud Service

How to import a localdb into a SSDT project in VS 2012

I am using Visual Studio 2012 Premium. I have an MVC 4 internet project. I added a localdb sql server database file to the app_data folder. All works fine.
I added a new SSDT database project. I try and import the localdb into the database project and can't get it to work. First, it doesn't see the db connection strings in my web config. So I click create new connection, then advanced settings. For the server I entered (LocalDB)\v11.0, then I attach the db file and type type the file name for the logical name. I test the connection and it passes.
Now I click start and I get a dialog telling me the "server version or database compatibility level is not supported"
Is it possible to import a localdb database into an SSDT project?
Thank you
Instead of creating the SSDT project then importing, you should use the localDB database to create the project. Open the SQL Server Object Explorer (SSOX), right click the DB in localDB (you may have to add the server (LocalDB)/v11.0 ), then create new project.