commit e46c78fefd7c9bb1cb94e458538fb523ba9b9321 Author: AndreStork Date: Mon Nov 17 13:06:14 2025 +0100 Cristo bastardo diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..4d72b4f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,30 @@ +**/.classpath +**/.dockerignore +**/.env +**/.git +**/.gitignore +**/.project +**/.settings +**/.toolstarget +**/.vs +**/.vscode +**/*.*proj.user +**/*.dbmdl +**/*.jfm +**/azds.yaml +**/bin +**/charts +**/docker-compose* +**/Dockerfile* +**/node_modules +**/npm-debug.log +**/obj +**/secrets.dev.yaml +**/values.dev.yaml +LICENSE +README.md +!**/.gitignore +!.git/HEAD +!.git/config +!.git/packed-refs +!.git/refs/heads/** \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..35063fc --- /dev/null +++ b/.gitignore @@ -0,0 +1,54 @@ +## A streamlined .gitignore for modern .NET projects +## including temporary files, build results, and +## files generated by popular .NET tools. If you are +## developing with Visual Studio, the VS .gitignore +## https://github.com/github/gitignore/blob/main/VisualStudio.gitignore +## has more thorough IDE-specific entries. +## +## Get latest from https://github.com/github/gitignore/blob/main/Dotnet.gitignore + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +[Ww][Ii][Nn]32/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# ASP.NET Scaffolding +ScaffoldingReadMe.txt + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg + +# Others +~$* +*~ +CodeCoverage/ + +# MSBuild Binary and Structured Log +*.binlog + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml \ No newline at end of file diff --git a/.vs/2025-10-30_PizzaExpress/CopilotIndices/0.2.1653.9816/CodeChunks.db b/.vs/2025-10-30_PizzaExpress/CopilotIndices/0.2.1653.9816/CodeChunks.db new file mode 100644 index 0000000..772f0de Binary files /dev/null and b/.vs/2025-10-30_PizzaExpress/CopilotIndices/0.2.1653.9816/CodeChunks.db differ diff --git a/.vs/2025-10-30_PizzaExpress/CopilotIndices/0.2.1653.9816/SemanticSymbols.db b/.vs/2025-10-30_PizzaExpress/CopilotIndices/0.2.1653.9816/SemanticSymbols.db new file mode 100644 index 0000000..527188c Binary files /dev/null and b/.vs/2025-10-30_PizzaExpress/CopilotIndices/0.2.1653.9816/SemanticSymbols.db differ diff --git a/.vs/2025-10-30_PizzaExpress/CopilotIndices/0.2.1653.9816/SemanticSymbols.db-shm b/.vs/2025-10-30_PizzaExpress/CopilotIndices/0.2.1653.9816/SemanticSymbols.db-shm new file mode 100644 index 0000000..6d23cc6 Binary files /dev/null and b/.vs/2025-10-30_PizzaExpress/CopilotIndices/0.2.1653.9816/SemanticSymbols.db-shm differ diff --git a/.vs/2025-10-30_PizzaExpress/CopilotIndices/0.2.1653.9816/SemanticSymbols.db-wal b/.vs/2025-10-30_PizzaExpress/CopilotIndices/0.2.1653.9816/SemanticSymbols.db-wal new file mode 100644 index 0000000..36f543c Binary files /dev/null and b/.vs/2025-10-30_PizzaExpress/CopilotIndices/0.2.1653.9816/SemanticSymbols.db-wal differ diff --git a/.vs/2025-10-30_PizzaExpress/DesignTimeBuild/.dtbcache.v2 b/.vs/2025-10-30_PizzaExpress/DesignTimeBuild/.dtbcache.v2 new file mode 100644 index 0000000..1047730 Binary files /dev/null and b/.vs/2025-10-30_PizzaExpress/DesignTimeBuild/.dtbcache.v2 differ diff --git a/.vs/2025-10-30_PizzaExpress/FileContentIndex/3a401030-cd8a-49b7-8c7c-83b7165e963c.vsidx b/.vs/2025-10-30_PizzaExpress/FileContentIndex/3a401030-cd8a-49b7-8c7c-83b7165e963c.vsidx new file mode 100644 index 0000000..d2db527 Binary files /dev/null and b/.vs/2025-10-30_PizzaExpress/FileContentIndex/3a401030-cd8a-49b7-8c7c-83b7165e963c.vsidx differ diff --git a/.vs/2025-10-30_PizzaExpress/FileContentIndex/962d2936-a286-4b2c-a35d-0e20af90ae69.vsidx b/.vs/2025-10-30_PizzaExpress/FileContentIndex/962d2936-a286-4b2c-a35d-0e20af90ae69.vsidx new file mode 100644 index 0000000..7b18e4b Binary files /dev/null and b/.vs/2025-10-30_PizzaExpress/FileContentIndex/962d2936-a286-4b2c-a35d-0e20af90ae69.vsidx differ diff --git a/.vs/2025-10-30_PizzaExpress/FileContentIndex/b5b1df6c-24c4-4076-8dac-5bd7c9e5386b.vsidx b/.vs/2025-10-30_PizzaExpress/FileContentIndex/b5b1df6c-24c4-4076-8dac-5bd7c9e5386b.vsidx new file mode 100644 index 0000000..2f1a12d Binary files /dev/null and b/.vs/2025-10-30_PizzaExpress/FileContentIndex/b5b1df6c-24c4-4076-8dac-5bd7c9e5386b.vsidx differ diff --git a/.vs/2025-10-30_PizzaExpress/FileContentIndex/b9f67409-9a12-46ea-85f7-66605f6cd7c1.vsidx b/.vs/2025-10-30_PizzaExpress/FileContentIndex/b9f67409-9a12-46ea-85f7-66605f6cd7c1.vsidx new file mode 100644 index 0000000..0b586ab Binary files /dev/null and b/.vs/2025-10-30_PizzaExpress/FileContentIndex/b9f67409-9a12-46ea-85f7-66605f6cd7c1.vsidx differ diff --git a/.vs/2025-10-30_PizzaExpress/FileContentIndex/f462e560-bc3d-4846-a504-bd7adbacf793.vsidx b/.vs/2025-10-30_PizzaExpress/FileContentIndex/f462e560-bc3d-4846-a504-bd7adbacf793.vsidx new file mode 100644 index 0000000..49eabd6 Binary files /dev/null and b/.vs/2025-10-30_PizzaExpress/FileContentIndex/f462e560-bc3d-4846-a504-bd7adbacf793.vsidx differ diff --git a/.vs/2025-10-30_PizzaExpress/config/applicationhost.config b/.vs/2025-10-30_PizzaExpress/config/applicationhost.config new file mode 100644 index 0000000..9948aa7 --- /dev/null +++ b/.vs/2025-10-30_PizzaExpress/config/applicationhost.config @@ -0,0 +1,1016 @@ + + + + + + + +
+
+
+
+
+
+
+
+ + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+ +
+
+
+
+
+
+ +
+
+
+
+
+ +
+
+
+ +
+
+ +
+
+ +
+
+
+ + +
+
+
+
+
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.vs/2025-10-30_PizzaExpress/copilot-chat/50364b41/sessions/5d2cecf2-fba8-4934-9f84-8077b3efd5f0 b/.vs/2025-10-30_PizzaExpress/copilot-chat/50364b41/sessions/5d2cecf2-fba8-4934-9f84-8077b3efd5f0 new file mode 100644 index 0000000..1facbc5 Binary files /dev/null and b/.vs/2025-10-30_PizzaExpress/copilot-chat/50364b41/sessions/5d2cecf2-fba8-4934-9f84-8077b3efd5f0 differ diff --git a/.vs/2025-10-30_PizzaExpress/v17/.futdcache.v2 b/.vs/2025-10-30_PizzaExpress/v17/.futdcache.v2 new file mode 100644 index 0000000..46ec742 Binary files /dev/null and b/.vs/2025-10-30_PizzaExpress/v17/.futdcache.v2 differ diff --git a/.vs/2025-10-30_PizzaExpress/v17/.suo b/.vs/2025-10-30_PizzaExpress/v17/.suo new file mode 100644 index 0000000..31ecbe8 Binary files /dev/null and b/.vs/2025-10-30_PizzaExpress/v17/.suo differ diff --git a/.vs/2025-10-30_PizzaExpress/v17/DocumentLayout.backup.json b/.vs/2025-10-30_PizzaExpress/v17/DocumentLayout.backup.json new file mode 100644 index 0000000..4938569 --- /dev/null +++ b/.vs/2025-10-30_PizzaExpress/v17/DocumentLayout.backup.json @@ -0,0 +1,118 @@ +{ + "Version": 1, + "WorkspaceRootPath": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|d:\\fiorencis\\coding\\cs\\2025-10-30_pizzaexpress\\pizzaexpress\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|solutionrelative:pizzaexpress\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|d:\\fiorencis\\coding\\cs\\2025-10-30_pizzaexpress\\pizzaexpress\\controllers\\pizzecontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|solutionrelative:pizzaexpress\\controllers\\pizzecontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|d:\\fiorencis\\coding\\cs\\2025-10-30_pizzaexpress\\pizzaexpress\\models\\pizza.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|solutionrelative:pizzaexpress\\models\\pizza.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|d:\\fiorencis\\coding\\cs\\2025-10-30_pizzaexpress\\pizzaexpress\\weatherforecast.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|solutionrelative:pizzaexpress\\weatherforecast.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|d:\\fiorencis\\coding\\cs\\2025-10-30_pizzaexpress\\pizzaexpress\\data\\pizzacontext.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|solutionrelative:pizzaexpress\\data\\pizzacontext.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|d:\\fiorencis\\coding\\cs\\2025-10-30_pizzaexpress\\pizzaexpress\\pizzaexpress.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|", + "RelativeMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|solutionrelative:pizzaexpress\\pizzaexpress.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 2, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "WeatherForecast.cs", + "DocumentMoniker": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\WeatherForecast.cs", + "RelativeDocumentMoniker": "PizzaExpress\\WeatherForecast.cs", + "ToolTip": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\WeatherForecast.cs", + "RelativeToolTip": "PizzaExpress\\WeatherForecast.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-10-30T07:41:25.868Z" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "PizzeController.cs", + "DocumentMoniker": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\Controllers\\PizzeController.cs", + "RelativeDocumentMoniker": "PizzaExpress\\Controllers\\PizzeController.cs", + "ToolTip": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\Controllers\\PizzeController.cs", + "RelativeToolTip": "PizzaExpress\\Controllers\\PizzeController.cs", + "ViewState": "AgIAAA0AAAAAAAAAAAAgwCoAAAAxAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-10-30T07:33:25.384Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Program.cs", + "DocumentMoniker": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\Program.cs", + "RelativeDocumentMoniker": "PizzaExpress\\Program.cs", + "ToolTip": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\Program.cs*", + "RelativeToolTip": "PizzaExpress\\Program.cs*", + "ViewState": "AgIAAAUAAAAAAAAAAAAxwBUAAAA3AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-10-30T07:29:48.542Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "Pizza.cs", + "DocumentMoniker": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\Models\\Pizza.cs", + "RelativeDocumentMoniker": "PizzaExpress\\Models\\Pizza.cs", + "ToolTip": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\Models\\Pizza.cs", + "RelativeToolTip": "PizzaExpress\\Models\\Pizza.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAYAAAArAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-10-30T07:25:03.715Z" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "PizzaContext.cs", + "DocumentMoniker": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\Data\\PizzaContext.cs", + "RelativeDocumentMoniker": "PizzaExpress\\Data\\PizzaContext.cs", + "ToolTip": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\Data\\PizzaContext.cs", + "RelativeToolTip": "PizzaExpress\\Data\\PizzaContext.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAMAAAAkAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-10-30T07:22:13.507Z" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "PizzaExpress.csproj", + "DocumentMoniker": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\PizzaExpress.csproj", + "RelativeDocumentMoniker": "PizzaExpress\\PizzaExpress.csproj", + "ToolTip": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\PizzaExpress.csproj", + "RelativeToolTip": "PizzaExpress\\PizzaExpress.csproj", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAsAAABaAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|", + "WhenOpened": "2025-10-30T07:19:02.255Z" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.vs/2025-10-30_PizzaExpress/v17/DocumentLayout.json b/.vs/2025-10-30_PizzaExpress/v17/DocumentLayout.json new file mode 100644 index 0000000..3f309af --- /dev/null +++ b/.vs/2025-10-30_PizzaExpress/v17/DocumentLayout.json @@ -0,0 +1,118 @@ +{ + "Version": 1, + "WorkspaceRootPath": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|d:\\fiorencis\\coding\\cs\\2025-10-30_pizzaexpress\\pizzaexpress\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|solutionrelative:pizzaexpress\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|d:\\fiorencis\\coding\\cs\\2025-10-30_pizzaexpress\\pizzaexpress\\controllers\\pizzecontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|solutionrelative:pizzaexpress\\controllers\\pizzecontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|d:\\fiorencis\\coding\\cs\\2025-10-30_pizzaexpress\\pizzaexpress\\models\\pizza.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|solutionrelative:pizzaexpress\\models\\pizza.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|d:\\fiorencis\\coding\\cs\\2025-10-30_pizzaexpress\\pizzaexpress\\weatherforecast.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|solutionrelative:pizzaexpress\\weatherforecast.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|d:\\fiorencis\\coding\\cs\\2025-10-30_pizzaexpress\\pizzaexpress\\data\\pizzacontext.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}", + "RelativeMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|solutionrelative:pizzaexpress\\data\\pizzacontext.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}" + }, + { + "AbsoluteMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|d:\\fiorencis\\coding\\cs\\2025-10-30_pizzaexpress\\pizzaexpress\\pizzaexpress.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|", + "RelativeMoniker": "D:0:0:{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}|PizzaExpress\\PizzaExpress.csproj|solutionrelative:pizzaexpress\\pizzaexpress.csproj||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 2, + "Children": [ + { + "$type": "Document", + "DocumentIndex": 3, + "Title": "WeatherForecast.cs", + "DocumentMoniker": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\WeatherForecast.cs", + "RelativeDocumentMoniker": "PizzaExpress\\WeatherForecast.cs", + "ToolTip": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\WeatherForecast.cs", + "RelativeToolTip": "PizzaExpress\\WeatherForecast.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-10-30T07:41:25.868Z" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "PizzeController.cs", + "DocumentMoniker": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\Controllers\\PizzeController.cs", + "RelativeDocumentMoniker": "PizzaExpress\\Controllers\\PizzeController.cs", + "ToolTip": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\Controllers\\PizzeController.cs", + "RelativeToolTip": "PizzaExpress\\Controllers\\PizzeController.cs", + "ViewState": "AgIAAA0AAAAAAAAAAAAgwCoAAAAxAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-10-30T07:33:25.384Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "Program.cs", + "DocumentMoniker": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\Program.cs", + "RelativeDocumentMoniker": "PizzaExpress\\Program.cs", + "ToolTip": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\Program.cs", + "RelativeToolTip": "PizzaExpress\\Program.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAABUAAAA3AAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-10-30T07:29:48.542Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "Pizza.cs", + "DocumentMoniker": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\Models\\Pizza.cs", + "RelativeDocumentMoniker": "PizzaExpress\\Models\\Pizza.cs", + "ToolTip": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\Models\\Pizza.cs", + "RelativeToolTip": "PizzaExpress\\Models\\Pizza.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAYAAAArAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-10-30T07:25:03.715Z" + }, + { + "$type": "Document", + "DocumentIndex": 4, + "Title": "PizzaContext.cs", + "DocumentMoniker": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\Data\\PizzaContext.cs", + "RelativeDocumentMoniker": "PizzaExpress\\Data\\PizzaContext.cs", + "ToolTip": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\Data\\PizzaContext.cs", + "RelativeToolTip": "PizzaExpress\\Data\\PizzaContext.cs", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAMAAAAkAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|", + "WhenOpened": "2025-10-30T07:22:13.507Z" + }, + { + "$type": "Document", + "DocumentIndex": 5, + "Title": "PizzaExpress.csproj", + "DocumentMoniker": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\PizzaExpress.csproj", + "RelativeDocumentMoniker": "PizzaExpress\\PizzaExpress.csproj", + "ToolTip": "D:\\Fiorencis\\Coding\\Cs\\2025-10-30_PizzaExpress\\PizzaExpress\\PizzaExpress.csproj", + "RelativeToolTip": "PizzaExpress\\PizzaExpress.csproj", + "ViewState": "AgIAAAAAAAAAAAAAAAAAAAsAAABaAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000758|", + "WhenOpened": "2025-10-30T07:19:02.255Z" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.vs/ProjectEvaluation/2025-10-30_pizzaexpress.metadata.v9.bin b/.vs/ProjectEvaluation/2025-10-30_pizzaexpress.metadata.v9.bin new file mode 100644 index 0000000..97f14f5 Binary files /dev/null and b/.vs/ProjectEvaluation/2025-10-30_pizzaexpress.metadata.v9.bin differ diff --git a/.vs/ProjectEvaluation/2025-10-30_pizzaexpress.projects.v9.bin b/.vs/ProjectEvaluation/2025-10-30_pizzaexpress.projects.v9.bin new file mode 100644 index 0000000..d199af2 Binary files /dev/null and b/.vs/ProjectEvaluation/2025-10-30_pizzaexpress.projects.v9.bin differ diff --git a/.vs/ProjectEvaluation/2025-10-30_pizzaexpress.strings.v9.bin b/.vs/ProjectEvaluation/2025-10-30_pizzaexpress.strings.v9.bin new file mode 100644 index 0000000..ec871cc Binary files /dev/null and b/.vs/ProjectEvaluation/2025-10-30_pizzaexpress.strings.v9.bin differ diff --git a/2025-10-30_PizzaExpress.sln b/2025-10-30_PizzaExpress.sln new file mode 100644 index 0000000..aec049b --- /dev/null +++ b/2025-10-30_PizzaExpress.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.11.35312.102 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PizzaExpress", "PizzaExpress\PizzaExpress.csproj", "{EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}.Debug|Any CPU.Build.0 = Debug|Any CPU + {EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}.Release|Any CPU.ActiveCfg = Release|Any CPU + {EEE7EBCE-8025-4BB8-BED0-0BC734CB00BF}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {50EB03E5-146C-4173-A354-9BF8FB8A264A} + EndGlobalSection +EndGlobal diff --git a/PizzaExpress/Controllers/PizzeController.cs b/PizzaExpress/Controllers/PizzeController.cs new file mode 100644 index 0000000..83a2c4b --- /dev/null +++ b/PizzaExpress/Controllers/PizzeController.cs @@ -0,0 +1,76 @@ +using Microsoft.AspNetCore.Mvc; +using Microsoft.EntityFrameworkCore; +using PizzaExpress.Data; +using PizzaExpress.Models; +namespace PizzaExpress.Controllers +{ + [ApiController] + [Route("api/pizze")] + public class PizzeController : ControllerBase + { + private readonly PizzaContext _ctx; + + public PizzeController(PizzaContext ctx) + { + _ctx = ctx; + } + + // GET: /api/pizze + [HttpGet] + [Produces("application/json", "text/xml")] + public async Task> GetPizze() + { + var list = await _ctx.Pizze.AsNoTracking().ToListAsync(); + // wrapper come nell'esempio Java { "pizze": [...] } + return Ok(new { pizze = list }); + } + + // GET: /api/pizze/{id} (JSON o XML in base all'header Accept) + [HttpGet("{id:int}")] + [Produces("application/json", "text/xml")] + public async Task GetPizzaById(int id) + { + var pizza = await _ctx.Pizze.AsNoTracking().FirstOrDefaultAsync(p => p.Id == id); + if (pizza is null) return NotFound(); + return Ok(pizza); + } + + // DELETE: /api/pizze/{id} + [HttpDelete("{id:int}")] + public async Task DeletePizza(int id) + { + var pizza = await _ctx.Pizze.FindAsync(id); + if (pizza is null) return NotFound(); + _ctx.Pizze.Remove(pizza); + await _ctx.SaveChangesAsync(); + return NoContent(); + } + + // PUT: /api/pizze/{id} Body: { "prezzo": 4.70 } + [HttpPut("{id:int}")] + public async Task UpdatePrezzo(int id, [FromBody] PrezzoUpdate body) + { + var pizza = await _ctx.Pizze.FindAsync(id); + if (pizza is null) return NotFound(); + pizza.Prezzo = body.Prezzo; + await _ctx.SaveChangesAsync(); + return NoContent(); + } + + // POST: /api/pizze Body: { "id":4, "nome":"della casa", "prezzo": 8.50 } + [HttpPost] + public async Task AddPizza([FromBody] Pizza p) + { + var exists = await _ctx.Pizze.AnyAsync(x => x.Id == p.Id); + if (exists) return BadRequest("ID già esistente."); + _ctx.Pizze.Add(p); + await _ctx.SaveChangesAsync(); + return CreatedAtAction(nameof(GetPizzaById), new { id = p.Id }, p); + } + + public class PrezzoUpdate + { + public decimal Prezzo { get; set; } + } + } +} diff --git a/PizzaExpress/Controllers/WeatherForecastController.cs b/PizzaExpress/Controllers/WeatherForecastController.cs new file mode 100644 index 0000000..38b4455 --- /dev/null +++ b/PizzaExpress/Controllers/WeatherForecastController.cs @@ -0,0 +1,33 @@ +using Microsoft.AspNetCore.Mvc; + +namespace PizzaExpress.Controllers +{ + [ApiController] + [Route("[controller]")] + public class WeatherForecastController : ControllerBase + { + private static readonly string[] Summaries = new[] + { + "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching" + }; + + private readonly ILogger _logger; + + public WeatherForecastController(ILogger logger) + { + _logger = logger; + } + + [HttpGet(Name = "GetWeatherForecast")] + public IEnumerable Get() + { + return Enumerable.Range(1, 5).Select(index => new WeatherForecast + { + Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)), + TemperatureC = Random.Shared.Next(-20, 55), + Summary = Summaries[Random.Shared.Next(Summaries.Length)] + }) + .ToArray(); + } + } +} diff --git a/PizzaExpress/Data/PizzaContext.cs b/PizzaExpress/Data/PizzaContext.cs new file mode 100644 index 0000000..eadef56 --- /dev/null +++ b/PizzaExpress/Data/PizzaContext.cs @@ -0,0 +1,31 @@ +// No, qui non troverai IIDX Sparkle Shower +// wait for chinese leakers +using PizzaExpress.Models; +using Microsoft.EntityFrameworkCore; + +namespace PizzaExpress.Data +{ + public class PizzaContext : DbContext + { + public PizzaContext(DbContextOptions options) + : base(options) { } + + public DbSet Pizze => Set(); + } + + public static class SeedData + { + public static void Initialize(PizzaContext ctx) + { + if (ctx.Pizze.Any()) return; + + ctx.Pizze.AddRange( + new Pizza { Id = 1, Nome = "Margherita", Prezzo = 4.50m }, + new Pizza { Id = 2, Nome = "Prosciutto", Prezzo = 5.00m }, + new Pizza { Id = 3, Nome = "Capricciosa", Prezzo = 7.00m } + ); + + ctx.SaveChanges(); + } + } +} diff --git a/PizzaExpress/Dockerfile b/PizzaExpress/Dockerfile new file mode 100644 index 0000000..55710ed --- /dev/null +++ b/PizzaExpress/Dockerfile @@ -0,0 +1,30 @@ +# Vedere https://aka.ms/customizecontainer per informazioni su come personalizzare il contenitore di debug e su come Visual Studio usa questo Dockerfile per compilare le immagini per un debug più rapido. + +# Questa fase viene usata durante l'esecuzione da Visual Studio in modalità rapida (impostazione predefinita per la configurazione di debug) +FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS base +USER app +WORKDIR /app +EXPOSE 8080 +EXPOSE 8081 + + +# Questa fase viene usata per compilare il progetto di servizio +FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build +ARG BUILD_CONFIGURATION=Release +WORKDIR /src +COPY ["PizzaExpress/PizzaExpress.csproj", "PizzaExpress/"] +RUN dotnet restore "./PizzaExpress/PizzaExpress.csproj" +COPY . . +WORKDIR "/src/PizzaExpress" +RUN dotnet build "./PizzaExpress.csproj" -c $BUILD_CONFIGURATION -o /app/build + +# Questa fase viene usata per pubblicare il progetto di servizio da copiare nella fase finale +FROM build AS publish +ARG BUILD_CONFIGURATION=Release +RUN dotnet publish "./PizzaExpress.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false + +# Questa fase viene usata nell'ambiente di produzione o durante l'esecuzione da Visual Studio in modalità normale (impostazione predefinita quando non si usa la configurazione di debug) +FROM base AS final +WORKDIR /app +COPY --from=publish /app/publish . +ENTRYPOINT ["dotnet", "PizzaExpress.dll"] \ No newline at end of file diff --git a/PizzaExpress/Models/Pizza.cs b/PizzaExpress/Models/Pizza.cs new file mode 100644 index 0000000..c211806 --- /dev/null +++ b/PizzaExpress/Models/Pizza.cs @@ -0,0 +1,9 @@ +namespace PizzaExpress.Models +{ + public class Pizza + { + public int Id { get; set; } + public string Nome { get; set; } = string.Empty; + public decimal Prezzo { get; set; } + } +} diff --git a/PizzaExpress/PizzaExpress.csproj b/PizzaExpress/PizzaExpress.csproj new file mode 100644 index 0000000..c11f7f6 --- /dev/null +++ b/PizzaExpress/PizzaExpress.csproj @@ -0,0 +1,17 @@ + + + + net8.0 + enable + enable + d99fa37d-ba8c-4bba-9c32-705cde4708c6 + Linux + + + + + + + + + diff --git a/PizzaExpress/PizzaExpress.csproj.user b/PizzaExpress/PizzaExpress.csproj.user new file mode 100644 index 0000000..fb7237f --- /dev/null +++ b/PizzaExpress/PizzaExpress.csproj.user @@ -0,0 +1,9 @@ + + + + http + + + ProjectDebugger + + \ No newline at end of file diff --git a/PizzaExpress/PizzaExpress.http b/PizzaExpress/PizzaExpress.http new file mode 100644 index 0000000..4d641e3 --- /dev/null +++ b/PizzaExpress/PizzaExpress.http @@ -0,0 +1,6 @@ +@PizzaExpress_HostAddress = http://localhost:5011 + +GET {{PizzaExpress_HostAddress}}/weatherforecast/ +Accept: application/json + +### diff --git a/PizzaExpress/Program.cs b/PizzaExpress/Program.cs new file mode 100644 index 0000000..b6626ff --- /dev/null +++ b/PizzaExpress/Program.cs @@ -0,0 +1,62 @@ +using Microsoft.EntityFrameworkCore; +using PizzaExpress.Data; + +namespace PizzaExpress +{ + public class Program + { + public static void Main(string[] args) + { + var MyAllowSpecificOrigins = "_myAllowSpecificOrigins"; + var builder = WebApplication.CreateBuilder(args); + + + builder.Services.AddCors(options => + { + options.AddPolicy(name: MyAllowSpecificOrigins, + policy => + { + policy.WithOrigins("http://127.0.0.1:5500", + "http://localhost:5500") + .AllowAnyMethod() + .AllowAnyHeader() + .AllowCredentials(); + }); + }); + + + // Add services to the container. + + builder.Services.AddControllers() + .AddXmlSerializerFormatters(); + + // DB in memory perch� siamo froci + builder.Services.AddDbContext(opt => + opt.UseInMemoryDatabase("dbpizze")); + + // Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle + builder.Services.AddEndpointsApiExplorer(); + builder.Services.AddSwaggerGen(); + + var app = builder.Build(); + + using (var porcoidddioooo = app.Services.CreateScope()) + { + var ctx = porcoidddioooo.ServiceProvider.GetRequiredService(); + SeedData.Initialize(ctx); + } + + app.UseSwagger(); + app.UseSwaggerUI(); + + app.UseHttpsRedirection(); + app.UseCors(MyAllowSpecificOrigins); + app.UseAuthorization(); + + + app.MapControllers(); + + app.Run(); + } + } +} diff --git a/PizzaExpress/Properties/launchSettings.json b/PizzaExpress/Properties/launchSettings.json new file mode 100644 index 0000000..e6051b2 --- /dev/null +++ b/PizzaExpress/Properties/launchSettings.json @@ -0,0 +1,52 @@ +{ + "profiles": { + "http": { + "commandName": "Project", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "dotnetRunMessages": true, + "applicationUrl": "http://localhost:5011" + }, + "https": { + "commandName": "Project", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "dotnetRunMessages": true, + "applicationUrl": "https://localhost:7297;http://localhost:5011" + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "Container (Dockerfile)": { + "commandName": "Docker", + "launchBrowser": true, + "launchUrl": "{Scheme}://{ServiceHost}:{ServicePort}/swagger", + "environmentVariables": { + "ASPNETCORE_HTTPS_PORTS": "8081", + "ASPNETCORE_HTTP_PORTS": "8080" + }, + "publishAllPorts": true, + "useSSL": true + } + }, + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:52949", + "sslPort": 44362 + } + } +} \ No newline at end of file diff --git a/PizzaExpress/WeatherForecast.cs b/PizzaExpress/WeatherForecast.cs new file mode 100644 index 0000000..dd7687b --- /dev/null +++ b/PizzaExpress/WeatherForecast.cs @@ -0,0 +1,13 @@ +namespace PizzaExpress +{ + public class WeatherForecast + { + public DateOnly Date { get; set; } + + public int TemperatureC { get; set; } + + public int TemperatureF => 32 + (int)(TemperatureC / 0.5556); + + public string? Summary { get; set; } + } +} diff --git a/PizzaExpress/appsettings.Development.json b/PizzaExpress/appsettings.Development.json new file mode 100644 index 0000000..ff66ba6 --- /dev/null +++ b/PizzaExpress/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/PizzaExpress/appsettings.json b/PizzaExpress/appsettings.json new file mode 100644 index 0000000..4d56694 --- /dev/null +++ b/PizzaExpress/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +}