Web API Cloud Hosting

Copper Contributor

How do you Publish your API to the service hosted on Azure and ensure the API is secure and accessible?

1 Reply

@Lesego13 Hey Type in the the Package Manager Console: dotnet ef dbcontext scaffold "<>" Microsoft.EntityFrameworkCore.SqlServer -o Models And replace <> with your connection string. If the following error occurs do the following: Your startup project 'MyTest Demo' doesn't reference Microsoft.EntityFrameworkCore.Design. This package is required for the Entity Framework Core Tools to work. Ensure your startup project is correct, install the package, and try again. Click on the solution to see the .csproj file Add the following line <GenerateRuntimeConfigurationFiles>True</GenerateRuntimeConfigurationFiles> If it still happens, open your startup.cs and add the following if it not there using Microsoft.EntityFrameworkCore;