Forum Discussion
Lesego13
Nov 17, 2022Copper Contributor
Web API Cloud Hosting
How do you Publish your API to the service hosted on Azure and ensure the API is secure and accessible?
Mb_sifanime
Nov 18, 2022Copper Contributor
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;