Skip to content

Commit b4b683e

Browse files
committed
Assume use of docker for DB
1 parent 4d21497 commit b4b683e

File tree

4 files changed

+12
-2
lines changed

4 files changed

+12
-2
lines changed

docs/img/sql-provider2.png

-23.2 KB
Loading

docs/img/sql-provider3.png

-54.6 KB
Loading

docs/img/sql-provider4.png

-30.3 KB
Loading

docs/recipes/storage/use-sqlprovider-ssdt.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
11
# Using SQLProvider SQL Server SSDT
22

3+
4+
## set up your database Server using Docker
5+
6+
The easiest way to get a database running locally is using Docker. You can find the installer on their [website](https://www.docker.com/get-started/). Once docker is installed, use the following command to spin up a database server
7+
8+
```
9+
docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=<your password>" -p 1433:1433 -d mcr.microsoft.com/mssql/server:2022-latest
10+
```
11+
312
## Creating a "SafeTodo" Database with Azure Data Studio
413

14+
515
### Connecting to a SQL Server Instance
616
1) In the "Connections" tab, click the "New Connection" button
717

818
![image](../../img/sql-provider1.png)
919

10-
2) Enter your connection details, leaving the "Database" dropdown set to `<Default>`. If you are connecting to an SQL Server instance in a Docker container with default port settings, put `localhost` in the **Server** field and use `SQL Login` as **Authentication type**.
20+
2) Enter your connection details, leaving the "Database" dropdown set to `<Default>`.
1121

1222
![image](../../img/sql-provider2.png)
1323

@@ -168,7 +178,7 @@ open Shared
168178
open Microsoft.AspNetCore.Http
169179
170180
let todosApi =
171-
let db = Database.createContext @"Data =.\SQLEXPRESS,1433;Database=SafeTodo;User ID=sa;Password=yourStrong(!)Password;Encrypt=false"
181+
let db = Database.createContext @"Data Source=localhost,1433;Database=SafeTodo;User ID=sa;Password=<your password>;TrustServerCertificate=True"
172182
{ getTodos = fun () -> TodoController.getTodos db
173183
addTodo = TodoController.addTodo db }
174184

0 commit comments

Comments
 (0)