Course reference .NET Core 3.1 MVC REST API - Full Course
- Pull SQL server docker image
docker pull mcr.microsoft.com/mssql/server:2019-latest- Start SQL Server container
docker run -d --name sql_server_demo -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=reallyStrongPwd123' -p 1433:1433 mcr.microsoft.com/mssql/server- Install
Azure Data Studioand connect to Db instance - Create new database via
Azure Data Studio - Create
Commandstable
CREATE TABLE [dbo].[Commands](
[Id] [int] NOT NULL,
[HowTo] [varchar](250) NULL,
[Line] [varchar](250) NULL,
[Platform] [varchar](255) NULL
) ON [PRIMARY]- Insert sample data to
Commandstable
- Update
appsettings.jsonaccordingly - Start server
dotnet run - Test APIs
curl https://localhost:5001/commands
curl https://localhost:5001/commands/{id}