diff --git a/.gitignore b/.gitignore
index 35063fc..31c93bd 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,9 @@
##
## Get latest from https://github.com/github/gitignore/blob/main/Dotnet.gitignore
+## Ignore vs files
+.vs/
+
# Build results
[Dd]ebug/
[Dd]ebugPublic/
diff --git a/.vs/CCMovieDatabase/CopilotIndices/17.14.1091.29919/CodeChunks.db b/.vs/CCMovieDatabase/CopilotIndices/17.14.1091.29919/CodeChunks.db
deleted file mode 100644
index c9cbb4b..0000000
Binary files a/.vs/CCMovieDatabase/CopilotIndices/17.14.1091.29919/CodeChunks.db and /dev/null differ
diff --git a/.vs/CCMovieDatabase/CopilotIndices/17.14.1091.29919/SemanticSymbols.db b/.vs/CCMovieDatabase/CopilotIndices/17.14.1091.29919/SemanticSymbols.db
deleted file mode 100644
index e078957..0000000
Binary files a/.vs/CCMovieDatabase/CopilotIndices/17.14.1091.29919/SemanticSymbols.db and /dev/null differ
diff --git a/.vs/CCMovieDatabase/DesignTimeBuild/.dtbcache.v2 b/.vs/CCMovieDatabase/DesignTimeBuild/.dtbcache.v2
deleted file mode 100644
index a6a7346..0000000
Binary files a/.vs/CCMovieDatabase/DesignTimeBuild/.dtbcache.v2 and /dev/null differ
diff --git a/.vs/CCMovieDatabase/FileContentIndex/06083164-4cda-495c-8638-7422dd3c34fb.vsidx b/.vs/CCMovieDatabase/FileContentIndex/06083164-4cda-495c-8638-7422dd3c34fb.vsidx
deleted file mode 100644
index e0809b6..0000000
Binary files a/.vs/CCMovieDatabase/FileContentIndex/06083164-4cda-495c-8638-7422dd3c34fb.vsidx and /dev/null differ
diff --git a/.vs/CCMovieDatabase/config/applicationhost.config b/.vs/CCMovieDatabase/config/applicationhost.config
deleted file mode 100644
index 269dc55..0000000
--- a/.vs/CCMovieDatabase/config/applicationhost.config
+++ /dev/null
@@ -1,1021 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/.vs/CCMovieDatabase/v17/.futdcache.v2 b/.vs/CCMovieDatabase/v17/.futdcache.v2
deleted file mode 100644
index 3ddcfab..0000000
Binary files a/.vs/CCMovieDatabase/v17/.futdcache.v2 and /dev/null differ
diff --git a/.vs/CCMovieDatabase/v17/.suo b/.vs/CCMovieDatabase/v17/.suo
deleted file mode 100644
index d66e5fe..0000000
Binary files a/.vs/CCMovieDatabase/v17/.suo and /dev/null differ
diff --git a/.vs/CCMovieDatabase/v17/DocumentLayout.backup.json b/.vs/CCMovieDatabase/v17/DocumentLayout.backup.json
deleted file mode 100644
index ab47a6c..0000000
--- a/.vs/CCMovieDatabase/v17/DocumentLayout.backup.json
+++ /dev/null
@@ -1,144 +0,0 @@
-{
- "Version": 1,
- "WorkspaceRootPath": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\",
- "Documents": [
- {
- "AbsoluteMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|c:\\users\\jesse.harlan\\source\\repos\\ccmoviedatabase\\ccmoviedatabase\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|solutionrelative:ccmoviedatabase\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|c:\\users\\jesse.harlan\\source\\repos\\ccmoviedatabase\\ccmoviedatabase\\controllers\\homecontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|solutionrelative:ccmoviedatabase\\controllers\\homecontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|c:\\users\\jesse.harlan\\source\\repos\\ccmoviedatabase\\ccmoviedatabase\\views\\shared\\_validationscriptspartial.cshtml||{40D31677-CBC0-4297-A9EF-89D907823A98}",
- "RelativeMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|solutionrelative:ccmoviedatabase\\views\\shared\\_validationscriptspartial.cshtml||{40D31677-CBC0-4297-A9EF-89D907823A98}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|c:\\users\\jesse.harlan\\source\\repos\\ccmoviedatabase\\ccmoviedatabase\\views\\shared\\_layout.cshtml||{40D31677-CBC0-4297-A9EF-89D907823A98}",
- "RelativeMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|solutionrelative:ccmoviedatabase\\views\\shared\\_layout.cshtml||{40D31677-CBC0-4297-A9EF-89D907823A98}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|c:\\users\\jesse.harlan\\source\\repos\\ccmoviedatabase\\ccmoviedatabase\\views\\home\\index.cshtml||{40D31677-CBC0-4297-A9EF-89D907823A98}",
- "RelativeMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|solutionrelative:ccmoviedatabase\\views\\home\\index.cshtml||{40D31677-CBC0-4297-A9EF-89D907823A98}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|c:\\users\\jesse.harlan\\source\\repos\\ccmoviedatabase\\ccmoviedatabase\\views\\_viewstart.cshtml||{40D31677-CBC0-4297-A9EF-89D907823A98}",
- "RelativeMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|solutionrelative:ccmoviedatabase\\views\\_viewstart.cshtml||{40D31677-CBC0-4297-A9EF-89D907823A98}"
- }
- ],
- "DocumentGroupContainers": [
- {
- "Orientation": 0,
- "VerticalTabListWidth": 256,
- "DocumentGroups": [
- {
- "DockedWidth": 200,
- "SelectedChildIndex": 5,
- "Children": [
- {
- "$type": "Bookmark",
- "Name": "ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}"
- },
- {
- "$type": "Document",
- "DocumentIndex": 2,
- "Title": "_ValidationScriptsPartial.cshtml",
- "DocumentMoniker": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Views\\Shared\\_ValidationScriptsPartial.cshtml",
- "RelativeDocumentMoniker": "CCMovieDatabase\\Views\\Shared\\_ValidationScriptsPartial.cshtml",
- "ToolTip": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Views\\Shared\\_ValidationScriptsPartial.cshtml",
- "RelativeToolTip": "CCMovieDatabase\\Views\\Shared\\_ValidationScriptsPartial.cshtml",
- "ViewState": "AgIAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
- "WhenOpened": "2025-10-15T18:11:48.053Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 3,
- "Title": "_Layout.cshtml",
- "DocumentMoniker": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Views\\Shared\\_Layout.cshtml",
- "RelativeDocumentMoniker": "CCMovieDatabase\\Views\\Shared\\_Layout.cshtml",
- "ToolTip": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Views\\Shared\\_Layout.cshtml",
- "RelativeToolTip": "CCMovieDatabase\\Views\\Shared\\_Layout.cshtml",
- "ViewState": "AgIAACEAAAAAAAAAAAAAAC8AAAA5AAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
- "WhenOpened": "2025-10-15T18:10:08.845Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 5,
- "Title": "_ViewStart.cshtml",
- "DocumentMoniker": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Views\\_ViewStart.cshtml",
- "RelativeDocumentMoniker": "CCMovieDatabase\\Views\\_ViewStart.cshtml",
- "ToolTip": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Views\\_ViewStart.cshtml",
- "RelativeToolTip": "CCMovieDatabase\\Views\\_ViewStart.cshtml",
- "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
- "WhenOpened": "2025-10-15T18:09:57.305Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 4,
- "Title": "Index.cshtml",
- "DocumentMoniker": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Views\\Home\\Index.cshtml",
- "RelativeDocumentMoniker": "CCMovieDatabase\\Views\\Home\\Index.cshtml",
- "ToolTip": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Views\\Home\\Index.cshtml",
- "RelativeToolTip": "CCMovieDatabase\\Views\\Home\\Index.cshtml",
- "ViewState": "AgIAAAAAAAAAAAAAAAAAAAcAAAAGAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
- "WhenOpened": "2025-10-15T18:09:20.725Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 0,
- "Title": "Program.cs",
- "DocumentMoniker": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Program.cs",
- "RelativeDocumentMoniker": "CCMovieDatabase\\Program.cs",
- "ToolTip": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Program.cs",
- "RelativeToolTip": "CCMovieDatabase\\Program.cs",
- "ViewState": "AgIAAA0AAAAAAAAAAAAgwB0AAABCAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2025-10-15T18:04:16.136Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 1,
- "Title": "HomeController.cs",
- "DocumentMoniker": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Controllers\\HomeController.cs",
- "RelativeDocumentMoniker": "CCMovieDatabase\\Controllers\\HomeController.cs",
- "ToolTip": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Controllers\\HomeController.cs",
- "RelativeToolTip": "CCMovieDatabase\\Controllers\\HomeController.cs",
- "ViewState": "AgIAAAgAAAAAAAAAAAAQwA8AAAAiAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2025-10-15T18:03:20.632Z",
- "EditorCaption": ""
- }
- ]
- },
- {
- "DockedWidth": 116,
- "SelectedChildIndex": -1,
- "Children": [
- {
- "$type": "Bookmark",
- "Name": "ST:0:0:{e1b7d1f8-9b3c-49b1-8f4f-bfc63a88835d}"
- },
- {
- "$type": "Bookmark",
- "Name": "ST:0:0:{0ad07096-bba9-4900-a651-0598d26f6d24}"
- },
- {
- "$type": "Bookmark",
- "Name": "ST:2:0:{d212f56b-c48a-434c-a121-1c5d80b59b9f}"
- }
- ]
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/.vs/CCMovieDatabase/v17/DocumentLayout.json b/.vs/CCMovieDatabase/v17/DocumentLayout.json
deleted file mode 100644
index ab47a6c..0000000
--- a/.vs/CCMovieDatabase/v17/DocumentLayout.json
+++ /dev/null
@@ -1,144 +0,0 @@
-{
- "Version": 1,
- "WorkspaceRootPath": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\",
- "Documents": [
- {
- "AbsoluteMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|c:\\users\\jesse.harlan\\source\\repos\\ccmoviedatabase\\ccmoviedatabase\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|solutionrelative:ccmoviedatabase\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|c:\\users\\jesse.harlan\\source\\repos\\ccmoviedatabase\\ccmoviedatabase\\controllers\\homecontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
- "RelativeMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|solutionrelative:ccmoviedatabase\\controllers\\homecontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|c:\\users\\jesse.harlan\\source\\repos\\ccmoviedatabase\\ccmoviedatabase\\views\\shared\\_validationscriptspartial.cshtml||{40D31677-CBC0-4297-A9EF-89D907823A98}",
- "RelativeMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|solutionrelative:ccmoviedatabase\\views\\shared\\_validationscriptspartial.cshtml||{40D31677-CBC0-4297-A9EF-89D907823A98}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|c:\\users\\jesse.harlan\\source\\repos\\ccmoviedatabase\\ccmoviedatabase\\views\\shared\\_layout.cshtml||{40D31677-CBC0-4297-A9EF-89D907823A98}",
- "RelativeMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|solutionrelative:ccmoviedatabase\\views\\shared\\_layout.cshtml||{40D31677-CBC0-4297-A9EF-89D907823A98}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|c:\\users\\jesse.harlan\\source\\repos\\ccmoviedatabase\\ccmoviedatabase\\views\\home\\index.cshtml||{40D31677-CBC0-4297-A9EF-89D907823A98}",
- "RelativeMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|solutionrelative:ccmoviedatabase\\views\\home\\index.cshtml||{40D31677-CBC0-4297-A9EF-89D907823A98}"
- },
- {
- "AbsoluteMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|c:\\users\\jesse.harlan\\source\\repos\\ccmoviedatabase\\ccmoviedatabase\\views\\_viewstart.cshtml||{40D31677-CBC0-4297-A9EF-89D907823A98}",
- "RelativeMoniker": "D:0:0:{CA95C814-1EC4-453F-A07A-58E07FBD5D00}|CCMovieDatabase\\CCMovieDatabase.csproj|solutionrelative:ccmoviedatabase\\views\\_viewstart.cshtml||{40D31677-CBC0-4297-A9EF-89D907823A98}"
- }
- ],
- "DocumentGroupContainers": [
- {
- "Orientation": 0,
- "VerticalTabListWidth": 256,
- "DocumentGroups": [
- {
- "DockedWidth": 200,
- "SelectedChildIndex": 5,
- "Children": [
- {
- "$type": "Bookmark",
- "Name": "ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}"
- },
- {
- "$type": "Document",
- "DocumentIndex": 2,
- "Title": "_ValidationScriptsPartial.cshtml",
- "DocumentMoniker": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Views\\Shared\\_ValidationScriptsPartial.cshtml",
- "RelativeDocumentMoniker": "CCMovieDatabase\\Views\\Shared\\_ValidationScriptsPartial.cshtml",
- "ToolTip": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Views\\Shared\\_ValidationScriptsPartial.cshtml",
- "RelativeToolTip": "CCMovieDatabase\\Views\\Shared\\_ValidationScriptsPartial.cshtml",
- "ViewState": "AgIAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
- "WhenOpened": "2025-10-15T18:11:48.053Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 3,
- "Title": "_Layout.cshtml",
- "DocumentMoniker": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Views\\Shared\\_Layout.cshtml",
- "RelativeDocumentMoniker": "CCMovieDatabase\\Views\\Shared\\_Layout.cshtml",
- "ToolTip": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Views\\Shared\\_Layout.cshtml",
- "RelativeToolTip": "CCMovieDatabase\\Views\\Shared\\_Layout.cshtml",
- "ViewState": "AgIAACEAAAAAAAAAAAAAAC8AAAA5AAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
- "WhenOpened": "2025-10-15T18:10:08.845Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 5,
- "Title": "_ViewStart.cshtml",
- "DocumentMoniker": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Views\\_ViewStart.cshtml",
- "RelativeDocumentMoniker": "CCMovieDatabase\\Views\\_ViewStart.cshtml",
- "ToolTip": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Views\\_ViewStart.cshtml",
- "RelativeToolTip": "CCMovieDatabase\\Views\\_ViewStart.cshtml",
- "ViewState": "AgIAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
- "WhenOpened": "2025-10-15T18:09:57.305Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 4,
- "Title": "Index.cshtml",
- "DocumentMoniker": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Views\\Home\\Index.cshtml",
- "RelativeDocumentMoniker": "CCMovieDatabase\\Views\\Home\\Index.cshtml",
- "ToolTip": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Views\\Home\\Index.cshtml",
- "RelativeToolTip": "CCMovieDatabase\\Views\\Home\\Index.cshtml",
- "ViewState": "AgIAAAAAAAAAAAAAAAAAAAcAAAAGAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000759|",
- "WhenOpened": "2025-10-15T18:09:20.725Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 0,
- "Title": "Program.cs",
- "DocumentMoniker": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Program.cs",
- "RelativeDocumentMoniker": "CCMovieDatabase\\Program.cs",
- "ToolTip": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Program.cs",
- "RelativeToolTip": "CCMovieDatabase\\Program.cs",
- "ViewState": "AgIAAA0AAAAAAAAAAAAgwB0AAABCAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2025-10-15T18:04:16.136Z",
- "EditorCaption": ""
- },
- {
- "$type": "Document",
- "DocumentIndex": 1,
- "Title": "HomeController.cs",
- "DocumentMoniker": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Controllers\\HomeController.cs",
- "RelativeDocumentMoniker": "CCMovieDatabase\\Controllers\\HomeController.cs",
- "ToolTip": "C:\\Users\\jesse.harlan\\source\\repos\\CCMovieDatabase\\CCMovieDatabase\\Controllers\\HomeController.cs",
- "RelativeToolTip": "CCMovieDatabase\\Controllers\\HomeController.cs",
- "ViewState": "AgIAAAgAAAAAAAAAAAAQwA8AAAAiAAAAAAAAAA==",
- "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
- "WhenOpened": "2025-10-15T18:03:20.632Z",
- "EditorCaption": ""
- }
- ]
- },
- {
- "DockedWidth": 116,
- "SelectedChildIndex": -1,
- "Children": [
- {
- "$type": "Bookmark",
- "Name": "ST:0:0:{e1b7d1f8-9b3c-49b1-8f4f-bfc63a88835d}"
- },
- {
- "$type": "Bookmark",
- "Name": "ST:0:0:{0ad07096-bba9-4900-a651-0598d26f6d24}"
- },
- {
- "$type": "Bookmark",
- "Name": "ST:2:0:{d212f56b-c48a-434c-a121-1c5d80b59b9f}"
- }
- ]
- }
- ]
- }
- ]
-}
\ No newline at end of file
diff --git a/.vs/ProjectEvaluation/ccmoviedatabase.metadata.v9.bin b/.vs/ProjectEvaluation/ccmoviedatabase.metadata.v9.bin
deleted file mode 100644
index 0db3006..0000000
Binary files a/.vs/ProjectEvaluation/ccmoviedatabase.metadata.v9.bin and /dev/null differ
diff --git a/.vs/ProjectEvaluation/ccmoviedatabase.projects.v9.bin b/.vs/ProjectEvaluation/ccmoviedatabase.projects.v9.bin
deleted file mode 100644
index c0daf66..0000000
Binary files a/.vs/ProjectEvaluation/ccmoviedatabase.projects.v9.bin and /dev/null differ
diff --git a/.vs/ProjectEvaluation/ccmoviedatabase.strings.v9.bin b/.vs/ProjectEvaluation/ccmoviedatabase.strings.v9.bin
deleted file mode 100644
index 2513863..0000000
Binary files a/.vs/ProjectEvaluation/ccmoviedatabase.strings.v9.bin and /dev/null differ
diff --git a/CCMovieDatabase/CCMovieDatabase.csproj b/CCMovieDatabase/CCMovieDatabase.csproj
index 6568b3d..0d1281d 100644
--- a/CCMovieDatabase/CCMovieDatabase.csproj
+++ b/CCMovieDatabase/CCMovieDatabase.csproj
@@ -6,4 +6,13 @@
enable
+
+
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+
+
+
+
diff --git a/CCMovieDatabase/CCMovieDatabase.csproj.user b/CCMovieDatabase/CCMovieDatabase.csproj.user
index 9ff5820..904fdb0 100644
--- a/CCMovieDatabase/CCMovieDatabase.csproj.user
+++ b/CCMovieDatabase/CCMovieDatabase.csproj.user
@@ -2,5 +2,16 @@
https
+ <_SelectedScaffolderID>MvcControllerWithContextScaffolder
+ <_SelectedScaffolderCategoryPath>root/Common
+ 650
+ 650
+ True
+ False
+ True
+
+ CCMovieDatabase.Data.MovieContext
+ False
+ True
\ No newline at end of file
diff --git a/CCMovieDatabase/Controllers/BlogController.cs b/CCMovieDatabase/Controllers/BlogController.cs
new file mode 100644
index 0000000..f619108
--- /dev/null
+++ b/CCMovieDatabase/Controllers/BlogController.cs
@@ -0,0 +1,157 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.Rendering;
+using Microsoft.EntityFrameworkCore;
+using CCMovieDatabase.Data;
+using CCMovieDatabase.Models;
+
+namespace CCMovieDatabase.Controllers
+{
+ public class BlogController : Controller
+ {
+ private readonly MovieContext _context;
+
+ public BlogController(MovieContext context)
+ {
+ _context = context;
+ }
+
+ // GET: Blog
+ public async Task Index()
+ {
+ return View(await _context.Articles.ToListAsync());
+ }
+
+ // GET: Blog/Details/5
+ public async Task Details(int? id)
+ {
+ if (id == null)
+ {
+ return NotFound();
+ }
+
+ var article = await _context.Articles
+ .FirstOrDefaultAsync(m => m.ArticleId == id);
+ if (article == null)
+ {
+ return NotFound();
+ }
+
+ return View(article);
+ }
+
+ // GET: Blog/Create
+ public IActionResult Create()
+ {
+ return View();
+ }
+
+ // POST: Blog/Create
+ // To protect from overposting attacks, enable the specific properties you want to bind to.
+ // For more details, see http://go.microsoft.com/fwlink/?LinkId=317598.
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ public async Task Create([Bind("ArticleId,Title,Body,Slug,CreatedAt,ModifiedAt,Author,ThumbnailUrl,ShortDescription,IsFeatured")] Article article)
+ {
+ if (ModelState.IsValid)
+ {
+ _context.Add(article);
+ await _context.SaveChangesAsync();
+ return RedirectToAction(nameof(Index));
+ }
+ return View(article);
+ }
+
+ // GET: Blog/Edit/5
+ public async Task Edit(int? id)
+ {
+ if (id == null)
+ {
+ return NotFound();
+ }
+
+ var article = await _context.Articles.FindAsync(id);
+ if (article == null)
+ {
+ return NotFound();
+ }
+ return View(article);
+ }
+
+ // POST: Blog/Edit/5
+ // To protect from overposting attacks, enable the specific properties you want to bind to.
+ // For more details, see http://go.microsoft.com/fwlink/?LinkId=317598.
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ public async Task Edit(int id, [Bind("ArticleId,Title,Body,Slug,CreatedAt,ModifiedAt,Author,ThumbnailUrl,ShortDescription,IsFeatured")] Article article)
+ {
+ if (id != article.ArticleId)
+ {
+ return NotFound();
+ }
+
+ if (ModelState.IsValid)
+ {
+ try
+ {
+ _context.Update(article);
+ await _context.SaveChangesAsync();
+ }
+ catch (DbUpdateConcurrencyException)
+ {
+ if (!ArticleExists(article.ArticleId))
+ {
+ return NotFound();
+ }
+ else
+ {
+ throw;
+ }
+ }
+ return RedirectToAction(nameof(Index));
+ }
+ return View(article);
+ }
+
+ // GET: Blog/Delete/5
+ public async Task Delete(int? id)
+ {
+ if (id == null)
+ {
+ return NotFound();
+ }
+
+ var article = await _context.Articles
+ .FirstOrDefaultAsync(m => m.ArticleId == id);
+ if (article == null)
+ {
+ return NotFound();
+ }
+
+ return View(article);
+ }
+
+ // POST: Blog/Delete/5
+ [HttpPost, ActionName("Delete")]
+ [ValidateAntiForgeryToken]
+ public async Task DeleteConfirmed(int id)
+ {
+ var article = await _context.Articles.FindAsync(id);
+ if (article != null)
+ {
+ _context.Articles.Remove(article);
+ }
+
+ await _context.SaveChangesAsync();
+ return RedirectToAction(nameof(Index));
+ }
+
+ private bool ArticleExists(int id)
+ {
+ return _context.Articles.Any(e => e.ArticleId == id);
+ }
+ }
+}
diff --git a/CCMovieDatabase/Controllers/HomeController.cs b/CCMovieDatabase/Controllers/HomeController.cs
index 93199ab..b72d551 100644
--- a/CCMovieDatabase/Controllers/HomeController.cs
+++ b/CCMovieDatabase/Controllers/HomeController.cs
@@ -1,4 +1,5 @@
using System.Diagnostics;
+using CCMovieDatabase.Data;
using CCMovieDatabase.Models;
using Microsoft.AspNetCore.Mvc;
@@ -7,15 +8,19 @@ namespace CCMovieDatabase.Controllers
public class HomeController : Controller
{
private readonly ILogger _logger;
+ private readonly MovieContext _context;
- public HomeController(ILogger logger)
+ public HomeController(ILogger logger, MovieContext context)
{
_logger = logger;
+ _context = context;
}
public IActionResult Index()
{
- return View();
+ // TODO: filter the articles by IsFeatured, returning only the most recent 4
+ var articles = _context.Articles.Take(4).ToList();
+ return View(articles);
}
public IActionResult Privacy()
diff --git a/CCMovieDatabase/Controllers/JesseController.cs b/CCMovieDatabase/Controllers/JesseController.cs
new file mode 100644
index 0000000..d79ea8a
--- /dev/null
+++ b/CCMovieDatabase/Controllers/JesseController.cs
@@ -0,0 +1,166 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.Rendering;
+using Microsoft.EntityFrameworkCore;
+using CCMovieDatabase.Data;
+using CCMovieDatabase.Models;
+
+namespace CCMovieDatabase.Controllers
+{
+ public class JesseController : Controller
+ {
+ private readonly MovieContext _context;
+
+ public JesseController(MovieContext context)
+ {
+ _context = context;
+ }
+
+ // GET: Jesse
+ public async Task Index()
+ {
+ var movieContext = _context.Movie
+ .Include(m => m.Rating)
+ .Where(m => m.Rating.Name == "G");
+ return View(await movieContext.ToListAsync());
+ }
+
+ // GET: Jesse/Details/5
+ public async Task Details(int? id)
+ {
+ if (id == null)
+ {
+ return NotFound();
+ }
+
+ var movie = await _context.Movie
+ .Include(m => m.Rating)
+ .FirstOrDefaultAsync(m => m.Id == id);
+ if (movie == null)
+ {
+ return NotFound();
+ }
+
+ return View(movie);
+ }
+
+ // GET: Jesse/Create
+ public IActionResult Create()
+ {
+ ViewData["RatingId"] = new SelectList(_context.Ratings, "RatingId", "RatingId");
+ return View();
+ }
+
+ // POST: Jesse/Create
+ // To protect from overposting attacks, enable the specific properties you want to bind to.
+ // For more details, see http://go.microsoft.com/fwlink/?LinkId=317598.
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ public async Task Create([Bind("Id,Title,Description,ReleaseDate,RatingId")] Movie movie)
+ {
+ if (ModelState.IsValid)
+ {
+ _context.Add(movie);
+ await _context.SaveChangesAsync();
+ return RedirectToAction(nameof(Index));
+ }
+ ViewData["RatingId"] = new SelectList(_context.Ratings, "RatingId", "RatingId", movie.RatingId);
+ return View(movie);
+ }
+
+ // GET: Jesse/Edit/5
+ public async Task Edit(int? id)
+ {
+ if (id == null)
+ {
+ return NotFound();
+ }
+
+ var movie = await _context.Movie.FindAsync(id);
+ if (movie == null)
+ {
+ return NotFound();
+ }
+ ViewData["RatingId"] = new SelectList(_context.Ratings, "RatingId", "RatingId", movie.RatingId);
+ return View(movie);
+ }
+
+ // POST: Jesse/Edit/5
+ // To protect from overposting attacks, enable the specific properties you want to bind to.
+ // For more details, see http://go.microsoft.com/fwlink/?LinkId=317598.
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ public async Task Edit(int id, [Bind("Id,Title,Description,ReleaseDate,RatingId")] Movie movie)
+ {
+ if (id != movie.Id)
+ {
+ return NotFound();
+ }
+
+ if (ModelState.IsValid)
+ {
+ try
+ {
+ _context.Update(movie);
+ await _context.SaveChangesAsync();
+ }
+ catch (DbUpdateConcurrencyException)
+ {
+ if (!MovieExists(movie.Id))
+ {
+ return NotFound();
+ }
+ else
+ {
+ throw;
+ }
+ }
+ return RedirectToAction(nameof(Index));
+ }
+ ViewData["RatingId"] = new SelectList(_context.Ratings, "RatingId", "RatingId", movie.RatingId);
+ return View(movie);
+ }
+
+ // GET: Jesse/Delete/5
+ public async Task Delete(int? id)
+ {
+ if (id == null)
+ {
+ return NotFound();
+ }
+
+ var movie = await _context.Movie
+ .Include(m => m.Rating)
+ .FirstOrDefaultAsync(m => m.Id == id);
+ if (movie == null)
+ {
+ return NotFound();
+ }
+
+ return View(movie);
+ }
+
+ // POST: Jesse/Delete/5
+ [HttpPost, ActionName("Delete")]
+ [ValidateAntiForgeryToken]
+ public async Task DeleteConfirmed(int id)
+ {
+ var movie = await _context.Movie.FindAsync(id);
+ if (movie != null)
+ {
+ _context.Movie.Remove(movie);
+ }
+
+ await _context.SaveChangesAsync();
+ return RedirectToAction(nameof(Index));
+ }
+
+ private bool MovieExists(int id)
+ {
+ return _context.Movie.Any(e => e.Id == id);
+ }
+ }
+}
diff --git a/CCMovieDatabase/Controllers/MoviesApiController.cs b/CCMovieDatabase/Controllers/MoviesApiController.cs
new file mode 100644
index 0000000..c1f6a8f
--- /dev/null
+++ b/CCMovieDatabase/Controllers/MoviesApiController.cs
@@ -0,0 +1,108 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Http;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.EntityFrameworkCore;
+using CCMovieDatabase.Data;
+using CCMovieDatabase.Models;
+
+namespace CCMovieDatabase.Controllers
+{
+ [Route("api/movies")]
+ [ApiController]
+ public class MoviesApiController : ControllerBase
+ {
+ private readonly MovieContext _context;
+
+ public MoviesApiController(MovieContext context)
+ {
+ _context = context;
+ }
+
+ // GET: api/Movies
+ [HttpGet]
+ public async Task>> GetMovie()
+ {
+ return await _context.Movie.ToListAsync();
+ }
+
+ // GET: api/Movies/5
+ [HttpGet("{id}")]
+ public async Task> GetMovie(int id)
+ {
+ var movie = await _context.Movie.FindAsync(id);
+
+ if (movie == null)
+ {
+ return NotFound();
+ }
+
+ return movie;
+ }
+
+ // PUT: api/Movies/5
+ // To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
+ [HttpPut("{id}")]
+ public async Task PutMovie(int id, Movie movie)
+ {
+ if (id != movie.Id)
+ {
+ return BadRequest();
+ }
+
+ _context.Entry(movie).State = EntityState.Modified;
+
+ try
+ {
+ await _context.SaveChangesAsync();
+ }
+ catch (DbUpdateConcurrencyException)
+ {
+ if (!MovieExists(id))
+ {
+ return NotFound();
+ }
+ else
+ {
+ throw;
+ }
+ }
+
+ return NoContent();
+ }
+
+ // POST: api/Movies
+ // To protect from overposting attacks, see https://go.microsoft.com/fwlink/?linkid=2123754
+ [HttpPost]
+ public async Task> PostMovie(Movie movie)
+ {
+ _context.Movie.Add(movie);
+ await _context.SaveChangesAsync();
+
+ return CreatedAtAction("GetMovie", new { id = movie.Id }, movie);
+ }
+
+ // DELETE: api/Movies/5
+ [HttpDelete("{id}")]
+ public async Task DeleteMovie(int id)
+ {
+ var movie = await _context.Movie.FindAsync(id);
+ if (movie == null)
+ {
+ return NotFound();
+ }
+
+ _context.Movie.Remove(movie);
+ await _context.SaveChangesAsync();
+
+ return NoContent();
+ }
+
+ private bool MovieExists(int id)
+ {
+ return _context.Movie.Any(e => e.Id == id);
+ }
+ }
+}
diff --git a/CCMovieDatabase/Controllers/MoviesController.cs b/CCMovieDatabase/Controllers/MoviesController.cs
new file mode 100644
index 0000000..4ec3a56
--- /dev/null
+++ b/CCMovieDatabase/Controllers/MoviesController.cs
@@ -0,0 +1,164 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.Rendering;
+using Microsoft.EntityFrameworkCore;
+using CCMovieDatabase.Data;
+using CCMovieDatabase.Models;
+
+namespace CCMovieDatabase.Controllers
+{
+ public class MoviesController : Controller
+ {
+ private readonly MovieContext _context;
+
+ public MoviesController(MovieContext context)
+ {
+ _context = context;
+ }
+
+ // GET: Movies
+ public async Task Index()
+ {
+ var movieContext = _context.Movie.Include(m => m.Rating);
+ return View(await movieContext.ToListAsync());
+ }
+
+ // GET: Movies/Details/5
+ public async Task Details(int? id)
+ {
+ if (id == null)
+ {
+ return NotFound();
+ }
+
+ var movie = await _context.Movie
+ .Include(m => m.Rating)
+ .FirstOrDefaultAsync(m => m.Id == id);
+ if (movie == null)
+ {
+ return NotFound();
+ }
+
+ return View(movie);
+ }
+
+ // GET: Movies/Create
+ public IActionResult Create()
+ {
+ ViewData["RatingId"] = new SelectList(_context.Ratings, "RatingId", "RatingId");
+ return View();
+ }
+
+ // POST: Movies/Create
+ // To protect from overposting attacks, enable the specific properties you want to bind to.
+ // For more details, see http://go.microsoft.com/fwlink/?LinkId=317598.
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ public async Task Create([Bind("Id,Title,Description,ReleaseDate,RatingId,ThumbnailURL")] Movie movie)
+ {
+ if (ModelState.IsValid)
+ {
+ _context.Add(movie);
+ await _context.SaveChangesAsync();
+ return RedirectToAction(nameof(Index));
+ }
+ ViewData["RatingId"] = new SelectList(_context.Ratings, "RatingId", "RatingId", movie.RatingId);
+ return View(movie);
+ }
+
+ // GET: Movies/Edit/5
+ public async Task Edit(int? id)
+ {
+ if (id == null)
+ {
+ return NotFound();
+ }
+
+ var movie = await _context.Movie.FindAsync(id);
+ if (movie == null)
+ {
+ return NotFound();
+ }
+ ViewData["RatingId"] = new SelectList(_context.Ratings, "RatingId", "RatingId", movie.RatingId);
+ return View(movie);
+ }
+
+ // POST: Movies/Edit/5
+ // To protect from overposting attacks, enable the specific properties you want to bind to.
+ // For more details, see http://go.microsoft.com/fwlink/?LinkId=317598.
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ public async Task Edit(int id, [Bind("Id,Title,Description,ReleaseDate,RatingId,ThumbnailURL")] Movie movie)
+ {
+ if (id != movie.Id)
+ {
+ return NotFound();
+ }
+
+ if (ModelState.IsValid)
+ {
+ try
+ {
+ _context.Update(movie);
+ await _context.SaveChangesAsync();
+ }
+ catch (DbUpdateConcurrencyException)
+ {
+ if (!MovieExists(movie.Id))
+ {
+ return NotFound();
+ }
+ else
+ {
+ throw;
+ }
+ }
+ return RedirectToAction(nameof(Index));
+ }
+ ViewData["RatingId"] = new SelectList(_context.Ratings, "RatingId", "RatingId", movie.RatingId);
+ return View(movie);
+ }
+
+ // GET: Movies/Delete/5
+ public async Task Delete(int? id)
+ {
+ if (id == null)
+ {
+ return NotFound();
+ }
+
+ var movie = await _context.Movie
+ .Include(m => m.Rating)
+ .FirstOrDefaultAsync(m => m.Id == id);
+ if (movie == null)
+ {
+ return NotFound();
+ }
+
+ return View(movie);
+ }
+
+ // POST: Movies/Delete/5
+ [HttpPost, ActionName("Delete")]
+ [ValidateAntiForgeryToken]
+ public async Task DeleteConfirmed(int id)
+ {
+ var movie = await _context.Movie.FindAsync(id);
+ if (movie != null)
+ {
+ _context.Movie.Remove(movie);
+ }
+
+ await _context.SaveChangesAsync();
+ return RedirectToAction(nameof(Index));
+ }
+
+ private bool MovieExists(int id)
+ {
+ return _context.Movie.Any(e => e.Id == id);
+ }
+ }
+}
diff --git a/CCMovieDatabase/Controllers/PorterListController.cs b/CCMovieDatabase/Controllers/PorterListController.cs
new file mode 100644
index 0000000..9eb321d
--- /dev/null
+++ b/CCMovieDatabase/Controllers/PorterListController.cs
@@ -0,0 +1,167 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.Rendering;
+using Microsoft.EntityFrameworkCore;
+using CCMovieDatabase.Data;
+using CCMovieDatabase.Models;
+
+namespace CCMovieDatabase.Controllers
+{
+ public class PorterListController : Controller
+ {
+ private readonly MovieContext _context;
+
+ public PorterListController(MovieContext context)
+ {
+ _context = context;
+ }
+
+ // GET: PorterList
+ public async Task Index()
+ {
+ var movieContext = _context.Movie
+ .Include(m => m.Rating)
+ .Skip(2)
+ .Take(5);
+ return View(await movieContext.ToListAsync());
+ }
+
+ // GET: PorterList/Details/5
+ public async Task Details(int? id)
+ {
+ if (id == null)
+ {
+ return NotFound();
+ }
+
+ var movie = await _context.Movie
+ .Include(m => m.Rating)
+ .FirstOrDefaultAsync(m => m.Id == id);
+ if (movie == null)
+ {
+ return NotFound();
+ }
+
+ return View(movie);
+ }
+
+ // GET: PorterList/Create
+ public IActionResult Create()
+ {
+ ViewData["RatingId"] = new SelectList(_context.Ratings, "RatingId", "RatingId");
+ return View();
+ }
+
+ // POST: PorterList/Create
+ // To protect from overposting attacks, enable the specific properties you want to bind to.
+ // For more details, see http://go.microsoft.com/fwlink/?LinkId=317598.
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ public async Task Create([Bind("Id,Title,Description,ReleaseDate,RatingId,ThumbnailURL")] Movie movie)
+ {
+ if (ModelState.IsValid)
+ {
+ _context.Add(movie);
+ await _context.SaveChangesAsync();
+ return RedirectToAction(nameof(Index));
+ }
+ ViewData["RatingId"] = new SelectList(_context.Ratings, "RatingId", "RatingId", movie.RatingId);
+ return View(movie);
+ }
+
+ // GET: PorterList/Edit/5
+ public async Task Edit(int? id)
+ {
+ if (id == null)
+ {
+ return NotFound();
+ }
+
+ var movie = await _context.Movie.FindAsync(id);
+ if (movie == null)
+ {
+ return NotFound();
+ }
+ ViewData["RatingId"] = new SelectList(_context.Ratings, "RatingId", "RatingId", movie.RatingId);
+ return View(movie);
+ }
+
+ // POST: PorterList/Edit/5
+ // To protect from overposting attacks, enable the specific properties you want to bind to.
+ // For more details, see http://go.microsoft.com/fwlink/?LinkId=317598.
+ [HttpPost]
+ [ValidateAntiForgeryToken]
+ public async Task Edit(int id, [Bind("Id,Title,Description,ReleaseDate,RatingId,ThumbnailURL")] Movie movie)
+ {
+ if (id != movie.Id)
+ {
+ return NotFound();
+ }
+
+ if (ModelState.IsValid)
+ {
+ try
+ {
+ _context.Update(movie);
+ await _context.SaveChangesAsync();
+ }
+ catch (DbUpdateConcurrencyException)
+ {
+ if (!MovieExists(movie.Id))
+ {
+ return NotFound();
+ }
+ else
+ {
+ throw;
+ }
+ }
+ return RedirectToAction(nameof(Index));
+ }
+ ViewData["RatingId"] = new SelectList(_context.Ratings, "RatingId", "RatingId", movie.RatingId);
+ return View(movie);
+ }
+
+ // GET: PorterList/Delete/5
+ public async Task Delete(int? id)
+ {
+ if (id == null)
+ {
+ return NotFound();
+ }
+
+ var movie = await _context.Movie
+ .Include(m => m.Rating)
+ .FirstOrDefaultAsync(m => m.Id == id);
+ if (movie == null)
+ {
+ return NotFound();
+ }
+
+ return View(movie);
+ }
+
+ // POST: PorterList/Delete/5
+ [HttpPost, ActionName("Delete")]
+ [ValidateAntiForgeryToken]
+ public async Task DeleteConfirmed(int id)
+ {
+ var movie = await _context.Movie.FindAsync(id);
+ if (movie != null)
+ {
+ _context.Movie.Remove(movie);
+ }
+
+ await _context.SaveChangesAsync();
+ return RedirectToAction(nameof(Index));
+ }
+
+ private bool MovieExists(int id)
+ {
+ return _context.Movie.Any(e => e.Id == id);
+ }
+ }
+}
diff --git a/CCMovieDatabase/Data/MovieContext.cs b/CCMovieDatabase/Data/MovieContext.cs
new file mode 100644
index 0000000..e9efe10
--- /dev/null
+++ b/CCMovieDatabase/Data/MovieContext.cs
@@ -0,0 +1,67 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using Microsoft.EntityFrameworkCore;
+using CCMovieDatabase.Models;
+using System.Reflection;
+
+namespace CCMovieDatabase.Data
+{
+ public class MovieContext : DbContext
+ {
+ public MovieContext (DbContextOptions options)
+ : base(options)
+ {
+ }
+
+ public DbSet Movie { get; set; } = default!;
+ public DbSet Ratings { get; set; } = default!;
+ public DbSet ActingCredits { get; set; } = default!;
+ public DbSet CrewCredits { get; set; } = default!;
+ public DbSet Articles { get; set; } = default!;
+ public DbSet Characters { get; set; } = default!;
+ public DbSet Persons { get; set; } = default!;
+
+ protected override void OnModelCreating(ModelBuilder modelBuilder)
+ {
+ base.OnModelCreating(modelBuilder);
+
+ var ratings = new List
+ {
+ new Rating { RatingId = 1, Name = "PG-13" },
+ new Rating { RatingId = 2, Name = "R" },
+ new Rating { RatingId = 3, Name = "G" },
+ new Rating { RatingId = 4, Name = "PG" }
+ };
+ modelBuilder.Entity().HasData(ratings);
+
+ // right here we seed data
+ var movies = new List
+ {
+ new Movie { Id = 1, Title = "Shrek", ReleaseDate = new DateOnly(2001, 04, 26), Description = "A mean lord exiles fairytale creatures to the swamp of a grumpy ogre, who must go on a quest and rescue a princess for the lord in order to get his land back.", RatingId = 1, ThumbnailURL = "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcTG_q0A0cypAsXxYlgs5J_554BrcnjeeKExlQE3ZaZUuPYv0fUd" },
+ new Movie { Id = 2, Title = "Shrek 2", ReleaseDate = new DateOnly(2002, 04, 26), Description = "Shrek is back baby!", RatingId = 1, ThumbnailURL = "https://encrypted-tbn3.gstatic.com/images?q=tbn:ANd9GcTPx7lW6h0G1O9-npEnVPL07fT74Tp6SFl0i47nxfypyVBcQFdS" },
+ new Movie { Id = 3, Title = "Harry Potter and the Sorcerer's Stone", ReleaseDate = new DateOnly(2001,01,01), Description = "An orphaned boy enrolls in a school of wizardry, where he learns the truth about himself, his family and the terrible evil that haunts the magical world.", RatingId = 4, ThumbnailURL = "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcQcZT3sdwr1NiJytvJb95icJJKPWpWRNv35l_uuVYxjlzBJS-hb" },
+ new Movie { Id = 4, Title = "Toy Story", ReleaseDate = new DateOnly(1995,01,01), Description = "A cowboy doll is profoundly jealous when a new spaceman action figure supplants him as the top toy in a boy's bedroom.", RatingId = 3, ThumbnailURL = "https://m.media-amazon.com/images/M/MV5BZTA3OWVjOWItNjE1NS00NzZiLWE1MjgtZDZhMWI1ZTlkNzYwXkEyXkFqcGc@._V1_.jpg" },
+ new Movie { Id = 5, Title = "A Christmas Story", ReleaseDate = new DateOnly(1983,01,01), Description = "In the 1940s, a young boy named Ralphie Parker attempts to convince his parents, teacher, and Santa Claus that a Red Ryder Range 200 Shot BB gun really is the perfect Christmas gift.", RatingId = 4, ThumbnailURL = "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcSUZk92ju8kisZKCc9m4lyySg9S5RSM6mhFnSWOpOb1_MlCsHsw" },
+ new Movie { Id = 6, Title = "Elf", ReleaseDate = new DateOnly(2003,01,01), Description = "Raised as an oversized elf, Buddy travels from the North Pole to New York City to meet his biological father, Walter Hobbs, who doesn't know he exists and is in desperate need of some Christmas spirit.", RatingId = 4, ThumbnailURL = "https://encrypted-tbn2.gstatic.com/images?q=tbn:ANd9GcT08ZFpbAwAL_jQFtQfMjut1_T6oNgxRCQiOPA6S1twJLXZq_Wi" },
+ new Movie { Id = 7, Title = "Weapons", ReleaseDate = new DateOnly(2025,01,01), Description = "When all but one child from the same class mysteriously vanish on the same night at exactly the same time, a community is left questioning who or what is behind their disappearance.", RatingId = 2, ThumbnailURL = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR84Bm2XnTfW7hukdkEdr5jezVGfoIt22h0-s7Dfk1aRavoPZmh" }
+
+ };
+
+ modelBuilder.Entity().HasData(movies);
+
+ // article seed data
+ var articles = new List
+ {
+ new Article { ArticleId = 1, Title = "Welcome to CCMovieDatabase", Body = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", Slug = "hello_world", CreatedAt = new DateTime(2025, 11, 12), ModifiedAt = new DateTime(2025, 11, 12), Author = "Jesse", ThumbnailUrl = "https://craftypixels.com/placeholder-image/300", ShortDescription = "Lorem Ipsum and stuff", IsFeatured = true },
+ new Article { ArticleId = 2, Title = "More Movies Added", Body = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", Slug = "hello_world2", CreatedAt = new DateTime(2025, 11, 12), ModifiedAt = new DateTime(2025, 11, 12), Author = "Jesse", ThumbnailUrl = "https://craftypixels.com/placeholder-image/300", ShortDescription = "Lorem Ipsum and stuff", IsFeatured = true },
+ new Article { ArticleId = 3, Title = "For the love of movies", Body = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", Slug = "hello_world3", CreatedAt = new DateTime(2025, 11, 12), ModifiedAt = new DateTime(2025, 11, 12), Author = "Jesse", ThumbnailUrl = "https://craftypixels.com/placeholder-image/300", ShortDescription = "Lorem Ipsum and stuff", IsFeatured = true },
+ new Article { ArticleId = 4, Title = "I wrote this", Body = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.", Slug = "hello_world4", CreatedAt = new DateTime(2025, 11, 12), ModifiedAt = new DateTime(2025, 11, 12), Author = "Jesse", ThumbnailUrl = "https://craftypixels.com/placeholder-image/300", ShortDescription = "Lorem Ipsum and stuff", IsFeatured = true },
+ };
+
+ modelBuilder.Entity().HasData(articles);
+
+ }
+ }
+}
diff --git a/CCMovieDatabase/Migrations/20251020182703_InitialMovieTable.Designer.cs b/CCMovieDatabase/Migrations/20251020182703_InitialMovieTable.Designer.cs
new file mode 100644
index 0000000..6de732e
--- /dev/null
+++ b/CCMovieDatabase/Migrations/20251020182703_InitialMovieTable.Designer.cs
@@ -0,0 +1,58 @@
+//
+using System;
+using CCMovieDatabase.Data;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CCMovieDatabase.Migrations
+{
+ [DbContext(typeof(MovieContext))]
+ [Migration("20251020182703_InitialMovieTable")]
+ partial class InitialMovieTable
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "9.0.0")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Movie", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("MotionPictureRating")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ReleaseDate")
+ .HasColumnType("date");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.ToTable("Movie");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/CCMovieDatabase/Migrations/20251020182703_InitialMovieTable.cs b/CCMovieDatabase/Migrations/20251020182703_InitialMovieTable.cs
new file mode 100644
index 0000000..ebea516
--- /dev/null
+++ b/CCMovieDatabase/Migrations/20251020182703_InitialMovieTable.cs
@@ -0,0 +1,38 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CCMovieDatabase.Migrations
+{
+ ///
+ public partial class InitialMovieTable : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ name: "Movie",
+ columns: table => new
+ {
+ Id = table.Column(type: "int", nullable: false)
+ .Annotation("SqlServer:Identity", "1, 1"),
+ Title = table.Column(type: "nvarchar(max)", nullable: false),
+ Description = table.Column(type: "nvarchar(max)", nullable: false),
+ MotionPictureRating = table.Column(type: "nvarchar(max)", nullable: false),
+ ReleaseDate = table.Column(type: "date", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Movie", x => x.Id);
+ });
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "Movie");
+ }
+ }
+}
diff --git a/CCMovieDatabase/Migrations/20251022173250_NullableDescription.Designer.cs b/CCMovieDatabase/Migrations/20251022173250_NullableDescription.Designer.cs
new file mode 100644
index 0000000..08e0113
--- /dev/null
+++ b/CCMovieDatabase/Migrations/20251022173250_NullableDescription.Designer.cs
@@ -0,0 +1,57 @@
+//
+using System;
+using CCMovieDatabase.Data;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CCMovieDatabase.Migrations
+{
+ [DbContext(typeof(MovieContext))]
+ [Migration("20251022173250_NullableDescription")]
+ partial class NullableDescription
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "9.0.0")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Movie", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("MotionPictureRating")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ReleaseDate")
+ .HasColumnType("date");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.ToTable("Movie");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/CCMovieDatabase/Migrations/20251022173250_NullableDescription.cs b/CCMovieDatabase/Migrations/20251022173250_NullableDescription.cs
new file mode 100644
index 0000000..54fdb6a
--- /dev/null
+++ b/CCMovieDatabase/Migrations/20251022173250_NullableDescription.cs
@@ -0,0 +1,36 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CCMovieDatabase.Migrations
+{
+ ///
+ public partial class NullableDescription : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AlterColumn(
+ name: "Description",
+ table: "Movie",
+ type: "nvarchar(max)",
+ nullable: true,
+ oldClrType: typeof(string),
+ oldType: "nvarchar(max)");
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AlterColumn(
+ name: "Description",
+ table: "Movie",
+ type: "nvarchar(max)",
+ nullable: false,
+ defaultValue: "",
+ oldClrType: typeof(string),
+ oldType: "nvarchar(max)",
+ oldNullable: true);
+ }
+ }
+}
diff --git a/CCMovieDatabase/Migrations/20251027175805_AddedSeedData.Designer.cs b/CCMovieDatabase/Migrations/20251027175805_AddedSeedData.Designer.cs
new file mode 100644
index 0000000..b9178ea
--- /dev/null
+++ b/CCMovieDatabase/Migrations/20251027175805_AddedSeedData.Designer.cs
@@ -0,0 +1,67 @@
+//
+using System;
+using CCMovieDatabase.Data;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CCMovieDatabase.Migrations
+{
+ [DbContext(typeof(MovieContext))]
+ [Migration("20251027175805_AddedSeedData")]
+ partial class AddedSeedData
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "9.0.0")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Movie", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("MotionPictureRating")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ReleaseDate")
+ .HasColumnType("date");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.ToTable("Movie");
+
+ b.HasData(
+ new
+ {
+ Id = 1,
+ Description = "A Movie about a big green loudmouth.",
+ MotionPictureRating = "PG",
+ ReleaseDate = new DateOnly(2001, 4, 26),
+ Title = "Shrek"
+ });
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/CCMovieDatabase/Migrations/20251027175805_AddedSeedData.cs b/CCMovieDatabase/Migrations/20251027175805_AddedSeedData.cs
new file mode 100644
index 0000000..4c7b3d1
--- /dev/null
+++ b/CCMovieDatabase/Migrations/20251027175805_AddedSeedData.cs
@@ -0,0 +1,29 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CCMovieDatabase.Migrations
+{
+ ///
+ public partial class AddedSeedData : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.InsertData(
+ table: "Movie",
+ columns: new[] { "Id", "Description", "MotionPictureRating", "ReleaseDate", "Title" },
+ values: new object[] { 1, "A Movie about a big green loudmouth.", "PG", new DateOnly(2001, 4, 26), "Shrek" });
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DeleteData(
+ table: "Movie",
+ keyColumn: "Id",
+ keyValue: 1);
+ }
+ }
+}
diff --git a/CCMovieDatabase/Migrations/20251027180626_UpdatedShrek.Designer.cs b/CCMovieDatabase/Migrations/20251027180626_UpdatedShrek.Designer.cs
new file mode 100644
index 0000000..02ae276
--- /dev/null
+++ b/CCMovieDatabase/Migrations/20251027180626_UpdatedShrek.Designer.cs
@@ -0,0 +1,67 @@
+//
+using System;
+using CCMovieDatabase.Data;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CCMovieDatabase.Migrations
+{
+ [DbContext(typeof(MovieContext))]
+ [Migration("20251027180626_UpdatedShrek")]
+ partial class UpdatedShrek
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "9.0.0")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Movie", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("MotionPictureRating")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ReleaseDate")
+ .HasColumnType("date");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.ToTable("Movie");
+
+ b.HasData(
+ new
+ {
+ Id = 1,
+ Description = "A mean lord exiles fairytale creatures to the swamp of a grumpy ogre, who must go on a quest and rescue a princess for the lord in order to get his land back.",
+ MotionPictureRating = "PG",
+ ReleaseDate = new DateOnly(2001, 4, 26),
+ Title = "Shrek"
+ });
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/CCMovieDatabase/Migrations/20251027180626_UpdatedShrek.cs b/CCMovieDatabase/Migrations/20251027180626_UpdatedShrek.cs
new file mode 100644
index 0000000..0ab1606
--- /dev/null
+++ b/CCMovieDatabase/Migrations/20251027180626_UpdatedShrek.cs
@@ -0,0 +1,32 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CCMovieDatabase.Migrations
+{
+ ///
+ public partial class UpdatedShrek : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.UpdateData(
+ table: "Movie",
+ keyColumn: "Id",
+ keyValue: 1,
+ column: "Description",
+ value: "A mean lord exiles fairytale creatures to the swamp of a grumpy ogre, who must go on a quest and rescue a princess for the lord in order to get his land back.");
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.UpdateData(
+ table: "Movie",
+ keyColumn: "Id",
+ keyValue: 1,
+ column: "Description",
+ value: "A Movie about a big green loudmouth.");
+ }
+ }
+}
diff --git a/CCMovieDatabase/Migrations/20251028182246_AddedRatings.Designer.cs b/CCMovieDatabase/Migrations/20251028182246_AddedRatings.Designer.cs
new file mode 100644
index 0000000..be6f1b9
--- /dev/null
+++ b/CCMovieDatabase/Migrations/20251028182246_AddedRatings.Designer.cs
@@ -0,0 +1,116 @@
+//
+using System;
+using CCMovieDatabase.Data;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CCMovieDatabase.Migrations
+{
+ [DbContext(typeof(MovieContext))]
+ [Migration("20251028182246_AddedRatings")]
+ partial class AddedRatings
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "9.0.0")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Movie", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RatingId")
+ .HasColumnType("int");
+
+ b.Property("ReleaseDate")
+ .HasColumnType("date");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RatingId");
+
+ b.ToTable("Movie");
+
+ b.HasData(
+ new
+ {
+ Id = 1,
+ Description = "A mean lord exiles fairytale creatures to the swamp of a grumpy ogre, who must go on a quest and rescue a princess for the lord in order to get his land back.",
+ RatingId = 1,
+ ReleaseDate = new DateOnly(2001, 4, 26),
+ Title = "Shrek"
+ },
+ new
+ {
+ Id = 2,
+ Description = "Shrek is back baby!",
+ RatingId = 1,
+ ReleaseDate = new DateOnly(2002, 4, 26),
+ Title = "Shrek 2"
+ });
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Rating", b =>
+ {
+ b.Property("RatingId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("RatingId"));
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("RatingId");
+
+ b.ToTable("Ratings");
+
+ b.HasData(
+ new
+ {
+ RatingId = 1,
+ Name = "PG-13"
+ },
+ new
+ {
+ RatingId = 2,
+ Name = "R"
+ });
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Movie", b =>
+ {
+ b.HasOne("CCMovieDatabase.Models.Rating", "Rating")
+ .WithMany()
+ .HasForeignKey("RatingId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Rating");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/CCMovieDatabase/Migrations/20251028182246_AddedRatings.cs b/CCMovieDatabase/Migrations/20251028182246_AddedRatings.cs
new file mode 100644
index 0000000..4591065
--- /dev/null
+++ b/CCMovieDatabase/Migrations/20251028182246_AddedRatings.cs
@@ -0,0 +1,113 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+#pragma warning disable CA1814 // Prefer jagged arrays over multidimensional
+
+namespace CCMovieDatabase.Migrations
+{
+ ///
+ public partial class AddedRatings : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropColumn(
+ name: "MotionPictureRating",
+ table: "Movie");
+
+ migrationBuilder.AddColumn(
+ name: "RatingId",
+ table: "Movie",
+ type: "int",
+ nullable: false,
+ defaultValue: 0);
+
+ migrationBuilder.CreateTable(
+ name: "Ratings",
+ columns: table => new
+ {
+ RatingId = table.Column(type: "int", nullable: false)
+ .Annotation("SqlServer:Identity", "1, 1"),
+ Name = table.Column(type: "nvarchar(max)", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Ratings", x => x.RatingId);
+ });
+
+ migrationBuilder.UpdateData(
+ table: "Movie",
+ keyColumn: "Id",
+ keyValue: 1,
+ column: "RatingId",
+ value: 1);
+
+ migrationBuilder.InsertData(
+ table: "Ratings",
+ columns: new[] { "RatingId", "Name" },
+ values: new object[,]
+ {
+ { 1, "PG-13" },
+ { 2, "R" }
+ });
+
+ migrationBuilder.InsertData(
+ table: "Movie",
+ columns: new[] { "Id", "Description", "RatingId", "ReleaseDate", "Title" },
+ values: new object[] { 2, "Shrek is back baby!", 1, new DateOnly(2002, 4, 26), "Shrek 2" });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_Movie_RatingId",
+ table: "Movie",
+ column: "RatingId");
+
+ migrationBuilder.AddForeignKey(
+ name: "FK_Movie_Ratings_RatingId",
+ table: "Movie",
+ column: "RatingId",
+ principalTable: "Ratings",
+ principalColumn: "RatingId",
+ onDelete: ReferentialAction.Cascade);
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropForeignKey(
+ name: "FK_Movie_Ratings_RatingId",
+ table: "Movie");
+
+ migrationBuilder.DropTable(
+ name: "Ratings");
+
+ migrationBuilder.DropIndex(
+ name: "IX_Movie_RatingId",
+ table: "Movie");
+
+ migrationBuilder.DeleteData(
+ table: "Movie",
+ keyColumn: "Id",
+ keyValue: 2);
+
+ migrationBuilder.DropColumn(
+ name: "RatingId",
+ table: "Movie");
+
+ migrationBuilder.AddColumn(
+ name: "MotionPictureRating",
+ table: "Movie",
+ type: "nvarchar(max)",
+ nullable: false,
+ defaultValue: "");
+
+ migrationBuilder.UpdateData(
+ table: "Movie",
+ keyColumn: "Id",
+ keyValue: 1,
+ column: "MotionPictureRating",
+ value: "PG");
+ }
+ }
+}
diff --git a/CCMovieDatabase/Migrations/20251029173631_AddedGRating.Designer.cs b/CCMovieDatabase/Migrations/20251029173631_AddedGRating.Designer.cs
new file mode 100644
index 0000000..5683d9b
--- /dev/null
+++ b/CCMovieDatabase/Migrations/20251029173631_AddedGRating.Designer.cs
@@ -0,0 +1,121 @@
+//
+using System;
+using CCMovieDatabase.Data;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CCMovieDatabase.Migrations
+{
+ [DbContext(typeof(MovieContext))]
+ [Migration("20251029173631_AddedGRating")]
+ partial class AddedGRating
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "9.0.0")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Movie", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RatingId")
+ .HasColumnType("int");
+
+ b.Property("ReleaseDate")
+ .HasColumnType("date");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RatingId");
+
+ b.ToTable("Movie");
+
+ b.HasData(
+ new
+ {
+ Id = 1,
+ Description = "A mean lord exiles fairytale creatures to the swamp of a grumpy ogre, who must go on a quest and rescue a princess for the lord in order to get his land back.",
+ RatingId = 1,
+ ReleaseDate = new DateOnly(2001, 4, 26),
+ Title = "Shrek"
+ },
+ new
+ {
+ Id = 2,
+ Description = "Shrek is back baby!",
+ RatingId = 1,
+ ReleaseDate = new DateOnly(2002, 4, 26),
+ Title = "Shrek 2"
+ });
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Rating", b =>
+ {
+ b.Property("RatingId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("RatingId"));
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("RatingId");
+
+ b.ToTable("Ratings");
+
+ b.HasData(
+ new
+ {
+ RatingId = 1,
+ Name = "PG-13"
+ },
+ new
+ {
+ RatingId = 2,
+ Name = "R"
+ },
+ new
+ {
+ RatingId = 3,
+ Name = "G"
+ });
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Movie", b =>
+ {
+ b.HasOne("CCMovieDatabase.Models.Rating", "Rating")
+ .WithMany()
+ .HasForeignKey("RatingId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Rating");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/CCMovieDatabase/Migrations/20251029173631_AddedGRating.cs b/CCMovieDatabase/Migrations/20251029173631_AddedGRating.cs
new file mode 100644
index 0000000..8407803
--- /dev/null
+++ b/CCMovieDatabase/Migrations/20251029173631_AddedGRating.cs
@@ -0,0 +1,28 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CCMovieDatabase.Migrations
+{
+ ///
+ public partial class AddedGRating : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.InsertData(
+ table: "Ratings",
+ columns: new[] { "RatingId", "Name" },
+ values: new object[] { 3, "G" });
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DeleteData(
+ table: "Ratings",
+ keyColumn: "RatingId",
+ keyValue: 3);
+ }
+ }
+}
diff --git a/CCMovieDatabase/Migrations/20251104185332_AddedTables.Designer.cs b/CCMovieDatabase/Migrations/20251104185332_AddedTables.Designer.cs
new file mode 100644
index 0000000..e4fd081
--- /dev/null
+++ b/CCMovieDatabase/Migrations/20251104185332_AddedTables.Designer.cs
@@ -0,0 +1,312 @@
+//
+using System;
+using CCMovieDatabase.Data;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CCMovieDatabase.Migrations
+{
+ [DbContext(typeof(MovieContext))]
+ [Migration("20251104185332_AddedTables")]
+ partial class AddedTables
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "9.0.0")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CCMovieDatabase.Models.ActingCredit", b =>
+ {
+ b.Property("ActingCreditId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ActingCreditId"));
+
+ b.Property("CharacterId")
+ .HasColumnType("int");
+
+ b.Property("PersonId")
+ .HasColumnType("int");
+
+ b.HasKey("ActingCreditId");
+
+ b.HasIndex("CharacterId");
+
+ b.HasIndex("PersonId");
+
+ b.ToTable("ActingCredits");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Article", b =>
+ {
+ b.Property("ArticleId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ArticleId"));
+
+ b.Property("Author")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Body")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime2");
+
+ b.Property("ModifiedAt")
+ .HasColumnType("datetime2");
+
+ b.Property("Slug")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("ArticleId");
+
+ b.ToTable("Articles");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Character", b =>
+ {
+ b.Property("CharacterId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("CharacterId"));
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("MovieId")
+ .HasColumnType("int");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("CharacterId");
+
+ b.HasIndex("MovieId");
+
+ b.ToTable("Characters");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.CrewCredit", b =>
+ {
+ b.Property("CrewCreditId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("CrewCreditId"));
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("MovieId")
+ .HasColumnType("int");
+
+ b.Property("PersonId")
+ .HasColumnType("int");
+
+ b.HasKey("CrewCreditId");
+
+ b.HasIndex("MovieId");
+
+ b.HasIndex("PersonId");
+
+ b.ToTable("CrewCredits");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Movie", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RatingId")
+ .HasColumnType("int");
+
+ b.Property("ReleaseDate")
+ .HasColumnType("date");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RatingId");
+
+ b.ToTable("Movie");
+
+ b.HasData(
+ new
+ {
+ Id = 1,
+ Description = "A mean lord exiles fairytale creatures to the swamp of a grumpy ogre, who must go on a quest and rescue a princess for the lord in order to get his land back.",
+ RatingId = 1,
+ ReleaseDate = new DateOnly(2001, 4, 26),
+ Title = "Shrek"
+ },
+ new
+ {
+ Id = 2,
+ Description = "Shrek is back baby!",
+ RatingId = 1,
+ ReleaseDate = new DateOnly(2002, 4, 26),
+ Title = "Shrek 2"
+ });
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Person", b =>
+ {
+ b.Property("PersonId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("PersonId"));
+
+ b.Property("FirstName")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastName")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("PersonId");
+
+ b.ToTable("Persons");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Rating", b =>
+ {
+ b.Property("RatingId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("RatingId"));
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("RatingId");
+
+ b.ToTable("Ratings");
+
+ b.HasData(
+ new
+ {
+ RatingId = 1,
+ Name = "PG-13"
+ },
+ new
+ {
+ RatingId = 2,
+ Name = "R"
+ },
+ new
+ {
+ RatingId = 3,
+ Name = "G"
+ });
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.ActingCredit", b =>
+ {
+ b.HasOne("CCMovieDatabase.Models.Character", "Character")
+ .WithMany()
+ .HasForeignKey("CharacterId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CCMovieDatabase.Models.Person", "Person")
+ .WithMany("ActingCredits")
+ .HasForeignKey("PersonId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Character");
+
+ b.Navigation("Person");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Character", b =>
+ {
+ b.HasOne("CCMovieDatabase.Models.Movie", "Movie")
+ .WithMany("Characters")
+ .HasForeignKey("MovieId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Movie");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.CrewCredit", b =>
+ {
+ b.HasOne("CCMovieDatabase.Models.Movie", "Movie")
+ .WithMany()
+ .HasForeignKey("MovieId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CCMovieDatabase.Models.Person", "Person")
+ .WithMany("CrewCredits")
+ .HasForeignKey("PersonId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Movie");
+
+ b.Navigation("Person");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Movie", b =>
+ {
+ b.HasOne("CCMovieDatabase.Models.Rating", "Rating")
+ .WithMany()
+ .HasForeignKey("RatingId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Rating");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Movie", b =>
+ {
+ b.Navigation("Characters");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Person", b =>
+ {
+ b.Navigation("ActingCredits");
+
+ b.Navigation("CrewCredits");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/CCMovieDatabase/Migrations/20251104185332_AddedTables.cs b/CCMovieDatabase/Migrations/20251104185332_AddedTables.cs
new file mode 100644
index 0000000..0370af7
--- /dev/null
+++ b/CCMovieDatabase/Migrations/20251104185332_AddedTables.cs
@@ -0,0 +1,165 @@
+using System;
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CCMovieDatabase.Migrations
+{
+ ///
+ public partial class AddedTables : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.CreateTable(
+ name: "Articles",
+ columns: table => new
+ {
+ ArticleId = table.Column(type: "int", nullable: false)
+ .Annotation("SqlServer:Identity", "1, 1"),
+ Title = table.Column(type: "nvarchar(max)", nullable: false),
+ Body = table.Column(type: "nvarchar(max)", nullable: false),
+ Slug = table.Column(type: "nvarchar(max)", nullable: false),
+ CreatedAt = table.Column(type: "datetime2", nullable: false),
+ ModifiedAt = table.Column(type: "datetime2", nullable: false),
+ Author = table.Column(type: "nvarchar(max)", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Articles", x => x.ArticleId);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "Characters",
+ columns: table => new
+ {
+ CharacterId = table.Column(type: "int", nullable: false)
+ .Annotation("SqlServer:Identity", "1, 1"),
+ Name = table.Column(type: "nvarchar(max)", nullable: false),
+ Description = table.Column(type: "nvarchar(max)", nullable: true),
+ MovieId = table.Column(type: "int", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Characters", x => x.CharacterId);
+ table.ForeignKey(
+ name: "FK_Characters_Movie_MovieId",
+ column: x => x.MovieId,
+ principalTable: "Movie",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "Persons",
+ columns: table => new
+ {
+ PersonId = table.Column(type: "int", nullable: false)
+ .Annotation("SqlServer:Identity", "1, 1"),
+ FirstName = table.Column(type: "nvarchar(max)", nullable: false),
+ LastName = table.Column(type: "nvarchar(max)", nullable: true)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_Persons", x => x.PersonId);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "ActingCredits",
+ columns: table => new
+ {
+ ActingCreditId = table.Column(type: "int", nullable: false)
+ .Annotation("SqlServer:Identity", "1, 1"),
+ PersonId = table.Column(type: "int", nullable: false),
+ CharacterId = table.Column(type: "int", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_ActingCredits", x => x.ActingCreditId);
+ table.ForeignKey(
+ name: "FK_ActingCredits_Characters_CharacterId",
+ column: x => x.CharacterId,
+ principalTable: "Characters",
+ principalColumn: "CharacterId",
+ onDelete: ReferentialAction.Cascade);
+ table.ForeignKey(
+ name: "FK_ActingCredits_Persons_PersonId",
+ column: x => x.PersonId,
+ principalTable: "Persons",
+ principalColumn: "PersonId",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateTable(
+ name: "CrewCredits",
+ columns: table => new
+ {
+ CrewCreditId = table.Column(type: "int", nullable: false)
+ .Annotation("SqlServer:Identity", "1, 1"),
+ PersonId = table.Column(type: "int", nullable: false),
+ MovieId = table.Column(type: "int", nullable: false),
+ Description = table.Column(type: "nvarchar(max)", nullable: false)
+ },
+ constraints: table =>
+ {
+ table.PrimaryKey("PK_CrewCredits", x => x.CrewCreditId);
+ table.ForeignKey(
+ name: "FK_CrewCredits_Movie_MovieId",
+ column: x => x.MovieId,
+ principalTable: "Movie",
+ principalColumn: "Id",
+ onDelete: ReferentialAction.Cascade);
+ table.ForeignKey(
+ name: "FK_CrewCredits_Persons_PersonId",
+ column: x => x.PersonId,
+ principalTable: "Persons",
+ principalColumn: "PersonId",
+ onDelete: ReferentialAction.Cascade);
+ });
+
+ migrationBuilder.CreateIndex(
+ name: "IX_ActingCredits_CharacterId",
+ table: "ActingCredits",
+ column: "CharacterId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_ActingCredits_PersonId",
+ table: "ActingCredits",
+ column: "PersonId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_Characters_MovieId",
+ table: "Characters",
+ column: "MovieId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_CrewCredits_MovieId",
+ table: "CrewCredits",
+ column: "MovieId");
+
+ migrationBuilder.CreateIndex(
+ name: "IX_CrewCredits_PersonId",
+ table: "CrewCredits",
+ column: "PersonId");
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropTable(
+ name: "ActingCredits");
+
+ migrationBuilder.DropTable(
+ name: "Articles");
+
+ migrationBuilder.DropTable(
+ name: "CrewCredits");
+
+ migrationBuilder.DropTable(
+ name: "Characters");
+
+ migrationBuilder.DropTable(
+ name: "Persons");
+ }
+ }
+}
diff --git a/CCMovieDatabase/Migrations/20251106190510_AddedThumbnails.Designer.cs b/CCMovieDatabase/Migrations/20251106190510_AddedThumbnails.Designer.cs
new file mode 100644
index 0000000..318b674
--- /dev/null
+++ b/CCMovieDatabase/Migrations/20251106190510_AddedThumbnails.Designer.cs
@@ -0,0 +1,315 @@
+//
+using System;
+using CCMovieDatabase.Data;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CCMovieDatabase.Migrations
+{
+ [DbContext(typeof(MovieContext))]
+ [Migration("20251106190510_AddedThumbnails")]
+ partial class AddedThumbnails
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "9.0.0")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CCMovieDatabase.Models.ActingCredit", b =>
+ {
+ b.Property("ActingCreditId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ActingCreditId"));
+
+ b.Property("CharacterId")
+ .HasColumnType("int");
+
+ b.Property("PersonId")
+ .HasColumnType("int");
+
+ b.HasKey("ActingCreditId");
+
+ b.HasIndex("CharacterId");
+
+ b.HasIndex("PersonId");
+
+ b.ToTable("ActingCredits");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Article", b =>
+ {
+ b.Property("ArticleId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ArticleId"));
+
+ b.Property("Author")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Body")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime2");
+
+ b.Property("ModifiedAt")
+ .HasColumnType("datetime2");
+
+ b.Property("Slug")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ThumbnailUrl")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("ArticleId");
+
+ b.ToTable("Articles");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Character", b =>
+ {
+ b.Property("CharacterId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("CharacterId"));
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("MovieId")
+ .HasColumnType("int");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("CharacterId");
+
+ b.HasIndex("MovieId");
+
+ b.ToTable("Characters");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.CrewCredit", b =>
+ {
+ b.Property("CrewCreditId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("CrewCreditId"));
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("MovieId")
+ .HasColumnType("int");
+
+ b.Property("PersonId")
+ .HasColumnType("int");
+
+ b.HasKey("CrewCreditId");
+
+ b.HasIndex("MovieId");
+
+ b.HasIndex("PersonId");
+
+ b.ToTable("CrewCredits");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Movie", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RatingId")
+ .HasColumnType("int");
+
+ b.Property("ReleaseDate")
+ .HasColumnType("date");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RatingId");
+
+ b.ToTable("Movie");
+
+ b.HasData(
+ new
+ {
+ Id = 1,
+ Description = "A mean lord exiles fairytale creatures to the swamp of a grumpy ogre, who must go on a quest and rescue a princess for the lord in order to get his land back.",
+ RatingId = 1,
+ ReleaseDate = new DateOnly(2001, 4, 26),
+ Title = "Shrek"
+ },
+ new
+ {
+ Id = 2,
+ Description = "Shrek is back baby!",
+ RatingId = 1,
+ ReleaseDate = new DateOnly(2002, 4, 26),
+ Title = "Shrek 2"
+ });
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Person", b =>
+ {
+ b.Property("PersonId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("PersonId"));
+
+ b.Property("FirstName")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastName")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("PersonId");
+
+ b.ToTable("Persons");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Rating", b =>
+ {
+ b.Property("RatingId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("RatingId"));
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("RatingId");
+
+ b.ToTable("Ratings");
+
+ b.HasData(
+ new
+ {
+ RatingId = 1,
+ Name = "PG-13"
+ },
+ new
+ {
+ RatingId = 2,
+ Name = "R"
+ },
+ new
+ {
+ RatingId = 3,
+ Name = "G"
+ });
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.ActingCredit", b =>
+ {
+ b.HasOne("CCMovieDatabase.Models.Character", "Character")
+ .WithMany()
+ .HasForeignKey("CharacterId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CCMovieDatabase.Models.Person", "Person")
+ .WithMany("ActingCredits")
+ .HasForeignKey("PersonId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Character");
+
+ b.Navigation("Person");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Character", b =>
+ {
+ b.HasOne("CCMovieDatabase.Models.Movie", "Movie")
+ .WithMany("Characters")
+ .HasForeignKey("MovieId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Movie");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.CrewCredit", b =>
+ {
+ b.HasOne("CCMovieDatabase.Models.Movie", "Movie")
+ .WithMany()
+ .HasForeignKey("MovieId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CCMovieDatabase.Models.Person", "Person")
+ .WithMany("CrewCredits")
+ .HasForeignKey("PersonId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Movie");
+
+ b.Navigation("Person");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Movie", b =>
+ {
+ b.HasOne("CCMovieDatabase.Models.Rating", "Rating")
+ .WithMany()
+ .HasForeignKey("RatingId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Rating");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Movie", b =>
+ {
+ b.Navigation("Characters");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Person", b =>
+ {
+ b.Navigation("ActingCredits");
+
+ b.Navigation("CrewCredits");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/CCMovieDatabase/Migrations/20251106190510_AddedThumbnails.cs b/CCMovieDatabase/Migrations/20251106190510_AddedThumbnails.cs
new file mode 100644
index 0000000..aa0cbad
--- /dev/null
+++ b/CCMovieDatabase/Migrations/20251106190510_AddedThumbnails.cs
@@ -0,0 +1,28 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CCMovieDatabase.Migrations
+{
+ ///
+ public partial class AddedThumbnails : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AddColumn(
+ name: "ThumbnailUrl",
+ table: "Articles",
+ type: "nvarchar(max)",
+ nullable: true);
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropColumn(
+ name: "ThumbnailUrl",
+ table: "Articles");
+ }
+ }
+}
diff --git a/CCMovieDatabase/Migrations/20251106191449_AddedArticleProps.Designer.cs b/CCMovieDatabase/Migrations/20251106191449_AddedArticleProps.Designer.cs
new file mode 100644
index 0000000..8891fde
--- /dev/null
+++ b/CCMovieDatabase/Migrations/20251106191449_AddedArticleProps.Designer.cs
@@ -0,0 +1,322 @@
+//
+using System;
+using CCMovieDatabase.Data;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CCMovieDatabase.Migrations
+{
+ [DbContext(typeof(MovieContext))]
+ [Migration("20251106191449_AddedArticleProps")]
+ partial class AddedArticleProps
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "9.0.0")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CCMovieDatabase.Models.ActingCredit", b =>
+ {
+ b.Property("ActingCreditId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ActingCreditId"));
+
+ b.Property("CharacterId")
+ .HasColumnType("int");
+
+ b.Property("PersonId")
+ .HasColumnType("int");
+
+ b.HasKey("ActingCreditId");
+
+ b.HasIndex("CharacterId");
+
+ b.HasIndex("PersonId");
+
+ b.ToTable("ActingCredits");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Article", b =>
+ {
+ b.Property("ArticleId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ArticleId"));
+
+ b.Property("Author")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Body")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime2");
+
+ b.Property("IsFeatured")
+ .HasColumnType("bit");
+
+ b.Property("ModifiedAt")
+ .HasColumnType("datetime2");
+
+ b.Property("ShortDescription")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Slug")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ThumbnailUrl")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("ArticleId");
+
+ b.ToTable("Articles");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Character", b =>
+ {
+ b.Property("CharacterId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("CharacterId"));
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("MovieId")
+ .HasColumnType("int");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("CharacterId");
+
+ b.HasIndex("MovieId");
+
+ b.ToTable("Characters");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.CrewCredit", b =>
+ {
+ b.Property("CrewCreditId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("CrewCreditId"));
+
+ b.Property("Description")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("MovieId")
+ .HasColumnType("int");
+
+ b.Property("PersonId")
+ .HasColumnType("int");
+
+ b.HasKey("CrewCreditId");
+
+ b.HasIndex("MovieId");
+
+ b.HasIndex("PersonId");
+
+ b.ToTable("CrewCredits");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Movie", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("Id"));
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("RatingId")
+ .HasColumnType("int");
+
+ b.Property("ReleaseDate")
+ .HasColumnType("date");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RatingId");
+
+ b.ToTable("Movie");
+
+ b.HasData(
+ new
+ {
+ Id = 1,
+ Description = "A mean lord exiles fairytale creatures to the swamp of a grumpy ogre, who must go on a quest and rescue a princess for the lord in order to get his land back.",
+ RatingId = 1,
+ ReleaseDate = new DateOnly(2001, 4, 26),
+ Title = "Shrek"
+ },
+ new
+ {
+ Id = 2,
+ Description = "Shrek is back baby!",
+ RatingId = 1,
+ ReleaseDate = new DateOnly(2002, 4, 26),
+ Title = "Shrek 2"
+ });
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Person", b =>
+ {
+ b.Property("PersonId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("PersonId"));
+
+ b.Property("FirstName")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("LastName")
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("PersonId");
+
+ b.ToTable("Persons");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Rating", b =>
+ {
+ b.Property("RatingId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("RatingId"));
+
+ b.Property("Name")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("RatingId");
+
+ b.ToTable("Ratings");
+
+ b.HasData(
+ new
+ {
+ RatingId = 1,
+ Name = "PG-13"
+ },
+ new
+ {
+ RatingId = 2,
+ Name = "R"
+ },
+ new
+ {
+ RatingId = 3,
+ Name = "G"
+ });
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.ActingCredit", b =>
+ {
+ b.HasOne("CCMovieDatabase.Models.Character", "Character")
+ .WithMany()
+ .HasForeignKey("CharacterId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CCMovieDatabase.Models.Person", "Person")
+ .WithMany("ActingCredits")
+ .HasForeignKey("PersonId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Character");
+
+ b.Navigation("Person");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Character", b =>
+ {
+ b.HasOne("CCMovieDatabase.Models.Movie", "Movie")
+ .WithMany("Characters")
+ .HasForeignKey("MovieId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Movie");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.CrewCredit", b =>
+ {
+ b.HasOne("CCMovieDatabase.Models.Movie", "Movie")
+ .WithMany()
+ .HasForeignKey("MovieId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.HasOne("CCMovieDatabase.Models.Person", "Person")
+ .WithMany("CrewCredits")
+ .HasForeignKey("PersonId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Movie");
+
+ b.Navigation("Person");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Movie", b =>
+ {
+ b.HasOne("CCMovieDatabase.Models.Rating", "Rating")
+ .WithMany()
+ .HasForeignKey("RatingId")
+ .OnDelete(DeleteBehavior.Cascade)
+ .IsRequired();
+
+ b.Navigation("Rating");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Movie", b =>
+ {
+ b.Navigation("Characters");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Person", b =>
+ {
+ b.Navigation("ActingCredits");
+
+ b.Navigation("CrewCredits");
+ });
+#pragma warning restore 612, 618
+ }
+ }
+}
diff --git a/CCMovieDatabase/Migrations/20251106191449_AddedArticleProps.cs b/CCMovieDatabase/Migrations/20251106191449_AddedArticleProps.cs
new file mode 100644
index 0000000..08b2e77
--- /dev/null
+++ b/CCMovieDatabase/Migrations/20251106191449_AddedArticleProps.cs
@@ -0,0 +1,40 @@
+using Microsoft.EntityFrameworkCore.Migrations;
+
+#nullable disable
+
+namespace CCMovieDatabase.Migrations
+{
+ ///
+ public partial class AddedArticleProps : Migration
+ {
+ ///
+ protected override void Up(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.AddColumn(
+ name: "IsFeatured",
+ table: "Articles",
+ type: "bit",
+ nullable: false,
+ defaultValue: false);
+
+ migrationBuilder.AddColumn(
+ name: "ShortDescription",
+ table: "Articles",
+ type: "nvarchar(max)",
+ nullable: false,
+ defaultValue: "");
+ }
+
+ ///
+ protected override void Down(MigrationBuilder migrationBuilder)
+ {
+ migrationBuilder.DropColumn(
+ name: "IsFeatured",
+ table: "Articles");
+
+ migrationBuilder.DropColumn(
+ name: "ShortDescription",
+ table: "Articles");
+ }
+ }
+}
diff --git a/CCMovieDatabase/Migrations/20251112190255_AddedArticles.Designer.cs b/CCMovieDatabase/Migrations/20251112190255_AddedArticles.Designer.cs
new file mode 100644
index 0000000..9216173
--- /dev/null
+++ b/CCMovieDatabase/Migrations/20251112190255_AddedArticles.Designer.cs
@@ -0,0 +1,376 @@
+//
+using System;
+using CCMovieDatabase.Data;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+
+#nullable disable
+
+namespace CCMovieDatabase.Migrations
+{
+ [DbContext(typeof(MovieContext))]
+ [Migration("20251112190255_AddedArticles")]
+ partial class AddedArticles
+ {
+ ///
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "9.0.0")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128);
+
+ SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
+
+ modelBuilder.Entity("CCMovieDatabase.Models.ActingCredit", b =>
+ {
+ b.Property("ActingCreditId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ActingCreditId"));
+
+ b.Property("CharacterId")
+ .HasColumnType("int");
+
+ b.Property("PersonId")
+ .HasColumnType("int");
+
+ b.HasKey("ActingCreditId");
+
+ b.HasIndex("CharacterId");
+
+ b.HasIndex("PersonId");
+
+ b.ToTable("ActingCredits");
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Article", b =>
+ {
+ b.Property("ArticleId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("ArticleId"));
+
+ b.Property("Author")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Body")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("CreatedAt")
+ .HasColumnType("datetime2");
+
+ b.Property("IsFeatured")
+ .HasColumnType("bit");
+
+ b.Property("ModifiedAt")
+ .HasColumnType("datetime2");
+
+ b.Property("ShortDescription")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Slug")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("ThumbnailUrl")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property("Title")
+ .IsRequired()
+ .HasColumnType("nvarchar(max)");
+
+ b.HasKey("ArticleId");
+
+ b.ToTable("Articles");
+
+ b.HasData(
+ new
+ {
+ ArticleId = 1,
+ Author = "Jesse",
+ Body = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
+ CreatedAt = new DateTime(2025, 11, 12, 0, 0, 0, 0, DateTimeKind.Unspecified),
+ IsFeatured = true,
+ ModifiedAt = new DateTime(2025, 11, 12, 0, 0, 0, 0, DateTimeKind.Unspecified),
+ ShortDescription = "Lorem Ipsum and stuff",
+ Slug = "hello_world",
+ ThumbnailUrl = "https://craftypixels.com/placeholder-image/300",
+ Title = "Welcome to CCMovieDatabase"
+ },
+ new
+ {
+ ArticleId = 2,
+ Author = "Jesse",
+ Body = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
+ CreatedAt = new DateTime(2025, 11, 12, 0, 0, 0, 0, DateTimeKind.Unspecified),
+ IsFeatured = true,
+ ModifiedAt = new DateTime(2025, 11, 12, 0, 0, 0, 0, DateTimeKind.Unspecified),
+ ShortDescription = "Lorem Ipsum and stuff",
+ Slug = "hello_world2",
+ ThumbnailUrl = "https://craftypixels.com/placeholder-image/300",
+ Title = "More Movies Added"
+ },
+ new
+ {
+ ArticleId = 3,
+ Author = "Jesse",
+ Body = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
+ CreatedAt = new DateTime(2025, 11, 12, 0, 0, 0, 0, DateTimeKind.Unspecified),
+ IsFeatured = true,
+ ModifiedAt = new DateTime(2025, 11, 12, 0, 0, 0, 0, DateTimeKind.Unspecified),
+ ShortDescription = "Lorem Ipsum and stuff",
+ Slug = "hello_world3",
+ ThumbnailUrl = "https://craftypixels.com/placeholder-image/300",
+ Title = "For the love of movies"
+ },
+ new
+ {
+ ArticleId = 4,
+ Author = "Jesse",
+ Body = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
+ CreatedAt = new DateTime(2025, 11, 12, 0, 0, 0, 0, DateTimeKind.Unspecified),
+ IsFeatured = true,
+ ModifiedAt = new DateTime(2025, 11, 12, 0, 0, 0, 0, DateTimeKind.Unspecified),
+ ShortDescription = "Lorem Ipsum and stuff",
+ Slug = "hello_world4",
+ ThumbnailUrl = "https://craftypixels.com/placeholder-image/300",
+ Title = "I wrote this"
+ });
+ });
+
+ modelBuilder.Entity("CCMovieDatabase.Models.Character", b =>
+ {
+ b.Property("CharacterId")
+ .ValueGeneratedOnAdd()
+ .HasColumnType("int");
+
+ SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property("CharacterId"));
+
+ b.Property("Description")
+ .HasColumnType("nvarchar(max)");
+
+ b.Property