Skip to content

Commit 0cc2b7e

Browse files
committed
feat: Prepare for Visual Studio Live Las Vegas 2025
1 parent 4072589 commit 0cc2b7e

62 files changed

Lines changed: 5082 additions & 37 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.copilot/mcp-config.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"mcpServers": {
3+
"EXAMPLE-trello": {
4+
"command": "npx",
5+
"args": [
6+
"-y",
7+
"@trello/mcp-server"
8+
],
9+
"env": {
10+
"TRELLO_API_KEY": "${TRELLO_API_KEY}",
11+
"TRELLO_TOKEN": "${TRELLO_TOKEN}"
12+
}
13+
}
14+
}
15+
}

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Squad: union merge for append-only team state files
2+
.squad/decisions.md merge=union
3+
.squad/agents/*/history.md merge=union
4+
.squad/log/** merge=union
5+
.squad/orchestration-log/** merge=union

.github/agents/squad.agent.md

Lines changed: 1146 additions & 0 deletions
Large diffs are not rendered by default.

.github/copilot-instructions.md

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
# Copilot Instructions — Time Travelling Data
2+
3+
This is a conference presentation repository for a session on **SQL Server Temporal Tables**. It contains two parallel demo tracks (T-SQL and EF Core), each in two variants (full and "fast" for 2-minute conference delivery).
4+
5+
## Repository Layout
6+
7+
```
8+
Demos/
9+
SQLDemo/ # Full T-SQL demo — 15 numbered .sql scripts run in SSMS
10+
SQLDemoFast/ # 2-minute T-SQL demo — 3 scripts (01-Setup, 02-Observe, 03-TimeTravel)
11+
EFCoreDemo/ # Full EF Core demo — .NET 6 console app, LocalDB
12+
EFCoreDemoFast/ # 2-minute EF Core demo — .NET 10 console app, Azure SQL
13+
FastSetup/ # Shared Terraform for provisioning Azure SQL Server + both databases
14+
Presentations/ # PDF slide decks from past events
15+
Resources/ # Supporting materials
16+
```
17+
18+
## Building and Running
19+
20+
### EFCoreDemoFast (.NET 10 — current "fast" demo)
21+
22+
```bash
23+
cd Demos/EFCoreDemoFast
24+
dotnet restore
25+
dotnet run
26+
```
27+
28+
Before running, copy and configure the connection string:
29+
```bash
30+
cp appsettings.example.json appsettings.json
31+
# Edit appsettings.json — set DefaultConnection to your Azure SQL connection string
32+
```
33+
34+
The app drops and recreates the `Employees` temporal table on each run — safe to run repeatedly.
35+
36+
### EFCoreDemo (.NET 6 — full demo, LocalDB)
37+
38+
```bash
39+
cd Demos/EFCoreDemo
40+
dotnet ef database update # Creates TTD_EFCore database on LocalDB
41+
dotnet run
42+
```
43+
44+
### SQLDemoFast
45+
46+
Run `01-Setup.sql`, `02-Observe.sql`, `03-TimeTravel.sql` in order in SSMS against the `TemporalDemo` database.
47+
48+
### SQLDemo (full)
49+
50+
Run the numbered scripts in order from within SSMS. Scripts are grouped in folders by topic.
51+
52+
### Infrastructure (Azure SQL)
53+
54+
```bash
55+
cd Demos/FastSetup/terraform
56+
cp terraform.tfvars.example terraform.tfvars
57+
# Edit terraform.tfvars — add subscription ID, location, SQL password
58+
terraform init
59+
terraform apply
60+
```
61+
62+
One `terraform apply` provisions the server and both databases (`TemporalDemo` for SQL demo, `TemporalEFDemo` for EF demo).
63+
64+
## Key Conventions
65+
66+
### Two parallel tracks, same domain
67+
68+
Both the SQL and EF Core demos use an **Employee** domain (name, title, salary, department) on purpose — the narrative maps directly between the T-SQL `FOR SYSTEM_TIME` clauses and EF Core's `TemporalAll()` / `TemporalAsOf()` / `TemporalBetween()` / etc. Keep the domains in sync when updating demos.
69+
70+
### EF Core temporal configuration
71+
72+
Temporal tables are enabled with a single fluent API call — no period columns on the POCO:
73+
74+
```csharp
75+
entity.ToTable(tb => tb.IsTemporal());
76+
```
77+
78+
EF manages `PeriodStart`/`PeriodEnd` as **shadow properties**. Access them via:
79+
```csharp
80+
EF.Property<DateTime>(emp, "PeriodStart")
81+
```
82+
83+
### EFCoreDemoFast resets on every run
84+
85+
`Program.cs` drops and recreates the `Employees` table via raw SQL before seeding. This is intentional for reliable demo resets. The `Migrations/` folder is reference material showing what EF generates — it is not used at runtime in the fast demo.
86+
87+
### EFCoreDemo (full) uses EF migrations
88+
89+
The full demo uses `dotnet ef database update` against `(localdb)\MSSQLLocalDB`, database `TTD_EFCore`. The migration is in `Demos/EFCoreDemo/Migrations/`.
90+
91+
### SQL demo uses HIDDEN period columns
92+
93+
In the SQL demo, `ValidFrom`/`ValidTo` are declared `HIDDEN` — they don't appear in `SELECT *`. To see them, name them explicitly:
94+
```sql
95+
SELECT EmployeeId, EmployeeName, ValidFrom, ValidTo FROM dbo.Employee;
96+
```
97+
98+
### Connection strings are gitignored
99+
100+
`appsettings.json` in `EFCoreDemoFast/` is gitignored. The safe placeholder is `appsettings.example.json`. Never commit real connection strings.
101+
102+
### EF Core temporal query mapping
103+
104+
| EF Core method | T-SQL equivalent |
105+
|----------------|-----------------|
106+
| `TemporalAll()` | `FOR SYSTEM_TIME ALL` |
107+
| `TemporalAsOf(dt)` | `FOR SYSTEM_TIME AS OF` |
108+
| `TemporalBetween(start, end)` | `FOR SYSTEM_TIME BETWEEN` |
109+
| `TemporalFromTo(start, end)` | `FOR SYSTEM_TIME FROM ... TO` |
110+
| `TemporalContainedIn(start, end)` | `FOR SYSTEM_TIME CONTAINED IN` |

.github/workflows/squad-ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Squad CI
2+
# Project type was not detected — configure build/test commands below
3+
4+
on:
5+
pull_request:
6+
branches: [dev, preview, main, insider]
7+
types: [opened, synchronize, reopened]
8+
push:
9+
branches: [dev, insider]
10+
11+
permissions:
12+
contents: read
13+
14+
jobs:
15+
test:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Build and test
21+
run: |
22+
# TODO: Project type was not detected — add your build/test commands here
23+
# Go: go test ./...
24+
# Python: pip install -r requirements.txt && pytest
25+
# .NET: dotnet test
26+
# Java (Maven): mvn test
27+
# Java (Gradle): ./gradlew test
28+
echo "No build commands configured — update squad-ci.yml"

.github/workflows/squad-docs.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Squad Docs — Build & Deploy
2+
# Project type was not detected — configure documentation build commands below
3+
4+
on:
5+
workflow_dispatch:
6+
push:
7+
branches: [preview]
8+
paths:
9+
- 'docs/**'
10+
- '.github/workflows/squad-docs.yml'
11+
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
jobs:
18+
build:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Build docs
24+
run: |
25+
# TODO: Add your documentation build commands here
26+
# This workflow is optional — remove or customize it for your project
27+
echo "No docs build commands configured — update or remove squad-docs.yml"

0 commit comments

Comments
 (0)