- Kelvin Mbewe
- Gráinne Meyer
- Caitlin O'Hara
- Shannon McGuckin
- Clone:
https://github.com/grainnem7/BapApi.git - Unzip:
BapApi - Open :
BapApi.sln in Visual Studio 2019 - JSON :
https://localhost:44308/api/StoreApps
This is a simple Visual Studio API Project for the Belfast Met Microsoft Academy.
- The project was created using this article.
- The default models and Startup.cs were updated to support Sqlite.
- A sqlite database was added, storeapps.db.
- A scaffolding controller was added to handle HTTP requests.
- The Models and Controller will need updated to build a workable API.
- The API uses the Entity Framework to manage the database connection.
- This page has good examples of Entity Framework Querying.
Using Sqlite complicates the process of publishing to an Azure App Service.
The following steps will get your Azure App up and running.
- These instructions were taken from here.
- Run this command in the same folder as your '.sln' file, 'dotnet publish -c Release -o ./publish'.
- Copy the Sqlite database, storeapps.db, to the publish folder if it is not there already.
- Install the Azure App Service extension for Visual Studio Code.
- Right click on your publish folder and select, 'Deploy to Web App'.
- Deploy to an App you have already setup on Azure.
- Make sure you setup a Free Tier (F1) App.
- You will need a working Azure account with credit to publish the App.