Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 13 additions & 15 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,38 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/dotnet-postgres
{
"name": "C# (.NET) and PostgreSQL",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"name": "C# (.NET) and PostgreSQL",
"dockerComposeFile": "docker-compose.yml",
"service": "app",
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
"features": {
"ghcr.io/devcontainers/features/node:1": {
"version": "lts"
}
},
"postCreateCommand": "dotnet restore",

"postCreateCommand": "dotnet tool install --global dotnet ef && dotnet restore",
"customizations": {
"vscode": {
"extensions": ["svelte.svelte-vscode", "mhutchie.git-graph", "eamodio.gitlens"]
"extensions": [
"svelte.svelte-vscode",
"mhutchie.git-graph",
"eamodio.gitlens"
]
}
}

}
// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Configure tool-specific properties.
// "customizations": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": ["app:5254"],
// "portsAttributes": {
// "5001": {
// "protocol": "https"
// }
// }

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "dotnet --info",

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "dotnet --info",
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,19 @@ public static List<PersonenZeitanteil> GetPersonenZeitanteile(

private static List<DateOnly> getTimestampsOfPersonenAnzahlChanges(List<Vertrag> vertraege, Zeitraum zeitraum)
{
var personenzahl = 0;
var begins = vertraege
.SelectMany(e => e.Versionen)
.OrderBy(e => e.Beginn)
.Where(e =>
{
var filter = e.Personenzahl != personenzahl;
personenzahl = e.Personenzahl;
return filter;
})
.Select(e => e.Beginn)
.ToList();

var ends = vertraege
.Where(e => e.Ende != null)
.Select(e => e.Ende is DateOnly d ? d.AddDays(1) : new DateOnly())
Expand Down
Loading
Loading