-
Make sure you have Docker installed. Docker Desktop for Mac and Windows
You can use the cli if you prefer. -
Login to or sign up with Docker Hub.
-
Install the SQL Server Extension in VSCODE.
-
Download and run the MSSQL Container:
$ docker run -e "ACCEPT_EULA=1" -e "MSSQL_SA_PASSWORD=MyPass@word" -e "MSSQL_PID=Developer" -e "MSSQL_USER=SA" -p 1433:1433 -d --name=sql mcr.microsoft.com/azure-sql-edge -
Configure The SQL Server Extension to access your database:
a. Click on the SQL Server tab in the left toolbar
b. Press + Add Connection and enter localhost in the command palette where it asks for server name, press ENTER.
c. Press Enter to accept the default database.
d. Choose SQL Login for authentication.
e. Enter
safor the username.f. Enter
MyPass@wordfor the password.g. Choose yes to save password.
h. For profile name enter ORM Demo.
-
If you don’t have .NET Core SDK installed yet, you can find it here.
-
Install the Entity Framework cli tool
$ dotnet tool install --global dotnet-ef. -
Clone this repository
$ git clone https://github.com/danmestas/ORMDemo.git -
Open the root of this repository in VSCode.
-
Create your initial migration:
$ dotnet ef migrations add InitialCreate
Written with StackEdit.