diff --git a/Directory.Build.props b/Directory.Build.props
index 0d034e0c5d..fcd668b5ba 100644
--- a/Directory.Build.props
+++ b/Directory.Build.props
@@ -4,14 +4,14 @@
netcoreapp2.0
netstandard2.0
- 2.1.0
+ 2.*
- 2.1.0
- 2.1.0
- 2.1.0
+ 2.*
+ 2.*
+ 2.*
- 2.1.0
- 2.1.0
+ 2.*
+ 2.*
4.0.0
2.1.0
diff --git a/JsonApiDotnetCore.sln b/JsonApiDotnetCore.sln
index a0330ce005..a0be085cb2 100644
--- a/JsonApiDotnetCore.sln
+++ b/JsonApiDotnetCore.sln
@@ -2,16 +2,10 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28606.126
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JsonApiDotNetCore", "src\JsonApiDotNetCore\JsonApiDotNetCore.csproj", "{C0EC9E70-EB2E-436F-9D94-FA16FA774123}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JsonApiDotNetCoreExample", "src\Examples\JsonApiDotNetCoreExample\JsonApiDotNetCoreExample.csproj", "{97EE048B-16C0-43F6-BDA9-4E762B2F579F}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{7A2B7ADD-ECB5-4D00-AA6A-D45BD11C97CF}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}"
EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JsonApiDotNetCoreExampleTests", "test\JsonApiDotNetCoreExampleTests\JsonApiDotNetCoreExampleTests.csproj", "{0B959765-40D2-43B5-87EE-FE2FEF9DBED5}"
-EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C5B4D998-CECB-454D-9F32-085A897577BE}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
@@ -23,31 +17,37 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
README.md = README.md
EndProjectSection
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NoEntityFrameworkExample", "src\Examples\NoEntityFrameworkExample\NoEntityFrameworkExample.csproj", "{570165EC-62B5-4684-A139-8D2A30DD4475}"
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{026FBC6C-AF76-4568-9B87-EC73457899FD}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "benchmarks", "benchmarks", "{076E1AE4-FD25-4684-B826-CAAE37FEA0AA}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NoEntityFrameworkTests", "test\NoEntityFrameworkTests\NoEntityFrameworkTests.csproj", "{73DA578D-A63F-4956-83ED-6D7102E09140}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JsonApiDotNetCore", "src\JsonApiDotNetCore\JsonApiDotNetCore.csproj", "{9D36BE59-7C14-448B-984D-93A0E7816314}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests", "test\UnitTests\UnitTests.csproj", "{6D4BD85A-A262-44C6-8572-FE3A30410BF3}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JsonApiDotNetCoreExample", "src\Examples\JsonApiDotNetCoreExample\JsonApiDotNetCoreExample.csproj", "{27FA7CD3-8DCD-4104-9AB4-B2D927F421B5}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Examples", "Examples", "{026FBC6C-AF76-4568-9B87-EC73457899FD}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NoEntityFrameworkExample", "src\Examples\NoEntityFrameworkExample\NoEntityFrameworkExample.csproj", "{99BAF03C-362B-41FA-9FFF-67F697EFC28C}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReportsExample", "src\Examples\ReportsExample\ReportsExample.csproj", "{FBFB0B0B-EA86-4B41-AB2A-E0249F70C86D}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ReportsExample", "src\Examples\ReportsExample\ReportsExample.csproj", "{1CC0831C-ED1D-442E-8421-331D50BD41F1}"
EndProject
-Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "benchmarks", "benchmarks", "{076E1AE4-FD25-4684-B826-CAAE37FEA0AA}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OperationsExample", "src\Examples\OperationsExample\OperationsExample.csproj", "{3AB43764-C57A-4B75-8C03-C671D3925BF3}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceEntitySeparationExample", "src\Examples\ResourceEntitySeparationExample\ResourceEntitySeparationExample.csproj", "{623792C0-5B7D-4D7D-A276-73F908FD4C34}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "JsonApiDotNetCoreExampleTests", "test\JsonApiDotNetCoreExampleTests\JsonApiDotNetCoreExampleTests.csproj", "{CAF331F8-9255-4D72-A1A8-A54141E99F1E}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Benchmarks", "benchmarks\Benchmarks.csproj", "{1F604666-BB0F-413E-922D-9D37C6073285}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "NoEntityFrameworkTests", "test\NoEntityFrameworkTests\NoEntityFrameworkTests.csproj", "{4F15A8F8-5BC6-45A1-BC51-03F921B726A4}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OperationsExample", "src\Examples\OperationsExample\OperationsExample.csproj", "{CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "test\UnitTests\UnitTests.csproj", "{8788FF65-C2B6-40B2-A3A0-1E3D91C02664}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OperationsExampleTests", "test\OperationsExampleTests\OperationsExampleTests.csproj", "{9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OperationsExampleTests", "test\OperationsExampleTests\OperationsExampleTests.csproj", "{65BF5960-3D9B-4230-99F4-A12CAA130792}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ResourceEntitySeparationExample", "src\Examples\ResourceEntitySeparationExample\ResourceEntitySeparationExample.csproj", "{F4097194-9415-418A-AB4E-315C5D5466AF}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ResourceEntitySeparationExampleTests", "test\ResourceEntitySeparationExampleTests\ResourceEntitySeparationExampleTests.csproj", "{778C4EB9-BD65-4C0F-9230-B5CB1D72186A}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ResourceEntitySeparationExampleTests", "test\ResourceEntitySeparationExampleTests\ResourceEntitySeparationExampleTests.csproj", "{6DFA30D7-1679-4333-9779-6FB678E48EF5}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DiscoveryTests", "test\DiscoveryTests\DiscoveryTests.csproj", "{03032A2F-664D-4DD8-A82F-AD8A482EDD85}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GettingStarted", "src\Examples\GettingStarted\GettingStarted.csproj", "{DF9BFD82-D937-4907-B0B4-64670417115F}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GettingStarted", "src\Examples\GettingStarted\GettingStarted.csproj", "{92BFF50F-BF96-43AD-AB86-A8B861C32412}"
EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DiscoveryTests", "test\DiscoveryTests\DiscoveryTests.csproj", "{09C0C8D8-B721-4955-8889-55CB149C3B5C}"
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Benchmarks", "benchmarks\Benchmarks.csproj", "{DF0FCFB2-CB12-44BA-BBB5-1BE0BCFCD14C}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -59,181 +59,181 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {C0EC9E70-EB2E-436F-9D94-FA16FA774123}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C0EC9E70-EB2E-436F-9D94-FA16FA774123}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C0EC9E70-EB2E-436F-9D94-FA16FA774123}.Debug|x64.ActiveCfg = Debug|Any CPU
- {C0EC9E70-EB2E-436F-9D94-FA16FA774123}.Debug|x86.ActiveCfg = Debug|Any CPU
- {C0EC9E70-EB2E-436F-9D94-FA16FA774123}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C0EC9E70-EB2E-436F-9D94-FA16FA774123}.Release|Any CPU.Build.0 = Release|Any CPU
- {C0EC9E70-EB2E-436F-9D94-FA16FA774123}.Release|x64.ActiveCfg = Release|Any CPU
- {C0EC9E70-EB2E-436F-9D94-FA16FA774123}.Release|x86.ActiveCfg = Release|Any CPU
- {97EE048B-16C0-43F6-BDA9-4E762B2F579F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {97EE048B-16C0-43F6-BDA9-4E762B2F579F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {97EE048B-16C0-43F6-BDA9-4E762B2F579F}.Debug|x64.ActiveCfg = Debug|Any CPU
- {97EE048B-16C0-43F6-BDA9-4E762B2F579F}.Debug|x86.ActiveCfg = Debug|Any CPU
- {97EE048B-16C0-43F6-BDA9-4E762B2F579F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {97EE048B-16C0-43F6-BDA9-4E762B2F579F}.Release|Any CPU.Build.0 = Release|Any CPU
- {97EE048B-16C0-43F6-BDA9-4E762B2F579F}.Release|x64.ActiveCfg = Release|Any CPU
- {97EE048B-16C0-43F6-BDA9-4E762B2F579F}.Release|x86.ActiveCfg = Release|Any CPU
- {0B959765-40D2-43B5-87EE-FE2FEF9DBED5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {0B959765-40D2-43B5-87EE-FE2FEF9DBED5}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {0B959765-40D2-43B5-87EE-FE2FEF9DBED5}.Debug|x64.ActiveCfg = Debug|Any CPU
- {0B959765-40D2-43B5-87EE-FE2FEF9DBED5}.Debug|x86.ActiveCfg = Debug|Any CPU
- {0B959765-40D2-43B5-87EE-FE2FEF9DBED5}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {0B959765-40D2-43B5-87EE-FE2FEF9DBED5}.Release|Any CPU.Build.0 = Release|Any CPU
- {0B959765-40D2-43B5-87EE-FE2FEF9DBED5}.Release|x64.ActiveCfg = Release|Any CPU
- {0B959765-40D2-43B5-87EE-FE2FEF9DBED5}.Release|x86.ActiveCfg = Release|Any CPU
- {570165EC-62B5-4684-A139-8D2A30DD4475}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {570165EC-62B5-4684-A139-8D2A30DD4475}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {570165EC-62B5-4684-A139-8D2A30DD4475}.Debug|x64.ActiveCfg = Debug|Any CPU
- {570165EC-62B5-4684-A139-8D2A30DD4475}.Debug|x64.Build.0 = Debug|Any CPU
- {570165EC-62B5-4684-A139-8D2A30DD4475}.Debug|x86.ActiveCfg = Debug|Any CPU
- {570165EC-62B5-4684-A139-8D2A30DD4475}.Debug|x86.Build.0 = Debug|Any CPU
- {570165EC-62B5-4684-A139-8D2A30DD4475}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {570165EC-62B5-4684-A139-8D2A30DD4475}.Release|Any CPU.Build.0 = Release|Any CPU
- {570165EC-62B5-4684-A139-8D2A30DD4475}.Release|x64.ActiveCfg = Release|Any CPU
- {570165EC-62B5-4684-A139-8D2A30DD4475}.Release|x64.Build.0 = Release|Any CPU
- {570165EC-62B5-4684-A139-8D2A30DD4475}.Release|x86.ActiveCfg = Release|Any CPU
- {570165EC-62B5-4684-A139-8D2A30DD4475}.Release|x86.Build.0 = Release|Any CPU
- {73DA578D-A63F-4956-83ED-6D7102E09140}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {73DA578D-A63F-4956-83ED-6D7102E09140}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {73DA578D-A63F-4956-83ED-6D7102E09140}.Debug|x64.ActiveCfg = Debug|Any CPU
- {73DA578D-A63F-4956-83ED-6D7102E09140}.Debug|x64.Build.0 = Debug|Any CPU
- {73DA578D-A63F-4956-83ED-6D7102E09140}.Debug|x86.ActiveCfg = Debug|Any CPU
- {73DA578D-A63F-4956-83ED-6D7102E09140}.Debug|x86.Build.0 = Debug|Any CPU
- {73DA578D-A63F-4956-83ED-6D7102E09140}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {73DA578D-A63F-4956-83ED-6D7102E09140}.Release|Any CPU.Build.0 = Release|Any CPU
- {73DA578D-A63F-4956-83ED-6D7102E09140}.Release|x64.ActiveCfg = Release|Any CPU
- {73DA578D-A63F-4956-83ED-6D7102E09140}.Release|x64.Build.0 = Release|Any CPU
- {73DA578D-A63F-4956-83ED-6D7102E09140}.Release|x86.ActiveCfg = Release|Any CPU
- {73DA578D-A63F-4956-83ED-6D7102E09140}.Release|x86.Build.0 = Release|Any CPU
- {6D4BD85A-A262-44C6-8572-FE3A30410BF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6D4BD85A-A262-44C6-8572-FE3A30410BF3}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6D4BD85A-A262-44C6-8572-FE3A30410BF3}.Debug|x64.ActiveCfg = Debug|Any CPU
- {6D4BD85A-A262-44C6-8572-FE3A30410BF3}.Debug|x64.Build.0 = Debug|Any CPU
- {6D4BD85A-A262-44C6-8572-FE3A30410BF3}.Debug|x86.ActiveCfg = Debug|Any CPU
- {6D4BD85A-A262-44C6-8572-FE3A30410BF3}.Debug|x86.Build.0 = Debug|Any CPU
- {6D4BD85A-A262-44C6-8572-FE3A30410BF3}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6D4BD85A-A262-44C6-8572-FE3A30410BF3}.Release|Any CPU.Build.0 = Release|Any CPU
- {6D4BD85A-A262-44C6-8572-FE3A30410BF3}.Release|x64.ActiveCfg = Release|Any CPU
- {6D4BD85A-A262-44C6-8572-FE3A30410BF3}.Release|x64.Build.0 = Release|Any CPU
- {6D4BD85A-A262-44C6-8572-FE3A30410BF3}.Release|x86.ActiveCfg = Release|Any CPU
- {6D4BD85A-A262-44C6-8572-FE3A30410BF3}.Release|x86.Build.0 = Release|Any CPU
- {FBFB0B0B-EA86-4B41-AB2A-E0249F70C86D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {FBFB0B0B-EA86-4B41-AB2A-E0249F70C86D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {FBFB0B0B-EA86-4B41-AB2A-E0249F70C86D}.Debug|x64.ActiveCfg = Debug|Any CPU
- {FBFB0B0B-EA86-4B41-AB2A-E0249F70C86D}.Debug|x64.Build.0 = Debug|Any CPU
- {FBFB0B0B-EA86-4B41-AB2A-E0249F70C86D}.Debug|x86.ActiveCfg = Debug|Any CPU
- {FBFB0B0B-EA86-4B41-AB2A-E0249F70C86D}.Debug|x86.Build.0 = Debug|Any CPU
- {FBFB0B0B-EA86-4B41-AB2A-E0249F70C86D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {FBFB0B0B-EA86-4B41-AB2A-E0249F70C86D}.Release|Any CPU.Build.0 = Release|Any CPU
- {FBFB0B0B-EA86-4B41-AB2A-E0249F70C86D}.Release|x64.ActiveCfg = Release|Any CPU
- {FBFB0B0B-EA86-4B41-AB2A-E0249F70C86D}.Release|x64.Build.0 = Release|Any CPU
- {FBFB0B0B-EA86-4B41-AB2A-E0249F70C86D}.Release|x86.ActiveCfg = Release|Any CPU
- {FBFB0B0B-EA86-4B41-AB2A-E0249F70C86D}.Release|x86.Build.0 = Release|Any CPU
- {1F604666-BB0F-413E-922D-9D37C6073285}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {1F604666-BB0F-413E-922D-9D37C6073285}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {1F604666-BB0F-413E-922D-9D37C6073285}.Debug|x64.ActiveCfg = Debug|Any CPU
- {1F604666-BB0F-413E-922D-9D37C6073285}.Debug|x64.Build.0 = Debug|Any CPU
- {1F604666-BB0F-413E-922D-9D37C6073285}.Debug|x86.ActiveCfg = Debug|Any CPU
- {1F604666-BB0F-413E-922D-9D37C6073285}.Debug|x86.Build.0 = Debug|Any CPU
- {1F604666-BB0F-413E-922D-9D37C6073285}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {1F604666-BB0F-413E-922D-9D37C6073285}.Release|Any CPU.Build.0 = Release|Any CPU
- {1F604666-BB0F-413E-922D-9D37C6073285}.Release|x64.ActiveCfg = Release|Any CPU
- {1F604666-BB0F-413E-922D-9D37C6073285}.Release|x64.Build.0 = Release|Any CPU
- {1F604666-BB0F-413E-922D-9D37C6073285}.Release|x86.ActiveCfg = Release|Any CPU
- {1F604666-BB0F-413E-922D-9D37C6073285}.Release|x86.Build.0 = Release|Any CPU
- {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Debug|x64.ActiveCfg = Debug|Any CPU
- {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Debug|x64.Build.0 = Debug|Any CPU
- {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Debug|x86.ActiveCfg = Debug|Any CPU
- {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Debug|x86.Build.0 = Debug|Any CPU
- {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Release|Any CPU.Build.0 = Release|Any CPU
- {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Release|x64.ActiveCfg = Release|Any CPU
- {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Release|x64.Build.0 = Release|Any CPU
- {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Release|x86.ActiveCfg = Release|Any CPU
- {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D}.Release|x86.Build.0 = Release|Any CPU
- {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Debug|x64.ActiveCfg = Debug|Any CPU
- {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Debug|x64.Build.0 = Debug|Any CPU
- {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Debug|x86.ActiveCfg = Debug|Any CPU
- {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Debug|x86.Build.0 = Debug|Any CPU
- {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Release|Any CPU.Build.0 = Release|Any CPU
- {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Release|x64.ActiveCfg = Release|Any CPU
- {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Release|x64.Build.0 = Release|Any CPU
- {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Release|x86.ActiveCfg = Release|Any CPU
- {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1}.Release|x86.Build.0 = Release|Any CPU
- {F4097194-9415-418A-AB4E-315C5D5466AF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F4097194-9415-418A-AB4E-315C5D5466AF}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F4097194-9415-418A-AB4E-315C5D5466AF}.Debug|x64.ActiveCfg = Debug|Any CPU
- {F4097194-9415-418A-AB4E-315C5D5466AF}.Debug|x64.Build.0 = Debug|Any CPU
- {F4097194-9415-418A-AB4E-315C5D5466AF}.Debug|x86.ActiveCfg = Debug|Any CPU
- {F4097194-9415-418A-AB4E-315C5D5466AF}.Debug|x86.Build.0 = Debug|Any CPU
- {F4097194-9415-418A-AB4E-315C5D5466AF}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F4097194-9415-418A-AB4E-315C5D5466AF}.Release|Any CPU.Build.0 = Release|Any CPU
- {F4097194-9415-418A-AB4E-315C5D5466AF}.Release|x64.ActiveCfg = Release|Any CPU
- {F4097194-9415-418A-AB4E-315C5D5466AF}.Release|x64.Build.0 = Release|Any CPU
- {F4097194-9415-418A-AB4E-315C5D5466AF}.Release|x86.ActiveCfg = Release|Any CPU
- {F4097194-9415-418A-AB4E-315C5D5466AF}.Release|x86.Build.0 = Release|Any CPU
- {6DFA30D7-1679-4333-9779-6FB678E48EF5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6DFA30D7-1679-4333-9779-6FB678E48EF5}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6DFA30D7-1679-4333-9779-6FB678E48EF5}.Debug|x64.ActiveCfg = Debug|Any CPU
- {6DFA30D7-1679-4333-9779-6FB678E48EF5}.Debug|x64.Build.0 = Debug|Any CPU
- {6DFA30D7-1679-4333-9779-6FB678E48EF5}.Debug|x86.ActiveCfg = Debug|Any CPU
- {6DFA30D7-1679-4333-9779-6FB678E48EF5}.Debug|x86.Build.0 = Debug|Any CPU
- {6DFA30D7-1679-4333-9779-6FB678E48EF5}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6DFA30D7-1679-4333-9779-6FB678E48EF5}.Release|Any CPU.Build.0 = Release|Any CPU
- {6DFA30D7-1679-4333-9779-6FB678E48EF5}.Release|x64.ActiveCfg = Release|Any CPU
- {6DFA30D7-1679-4333-9779-6FB678E48EF5}.Release|x64.Build.0 = Release|Any CPU
- {6DFA30D7-1679-4333-9779-6FB678E48EF5}.Release|x86.ActiveCfg = Release|Any CPU
- {6DFA30D7-1679-4333-9779-6FB678E48EF5}.Release|x86.Build.0 = Release|Any CPU
- {DF9BFD82-D937-4907-B0B4-64670417115F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {DF9BFD82-D937-4907-B0B4-64670417115F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {DF9BFD82-D937-4907-B0B4-64670417115F}.Debug|x64.ActiveCfg = Debug|Any CPU
- {DF9BFD82-D937-4907-B0B4-64670417115F}.Debug|x64.Build.0 = Debug|Any CPU
- {DF9BFD82-D937-4907-B0B4-64670417115F}.Debug|x86.ActiveCfg = Debug|Any CPU
- {DF9BFD82-D937-4907-B0B4-64670417115F}.Debug|x86.Build.0 = Debug|Any CPU
- {DF9BFD82-D937-4907-B0B4-64670417115F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {DF9BFD82-D937-4907-B0B4-64670417115F}.Release|Any CPU.Build.0 = Release|Any CPU
- {DF9BFD82-D937-4907-B0B4-64670417115F}.Release|x64.ActiveCfg = Release|Any CPU
- {DF9BFD82-D937-4907-B0B4-64670417115F}.Release|x64.Build.0 = Release|Any CPU
- {DF9BFD82-D937-4907-B0B4-64670417115F}.Release|x86.ActiveCfg = Release|Any CPU
- {DF9BFD82-D937-4907-B0B4-64670417115F}.Release|x86.Build.0 = Release|Any CPU
- {09C0C8D8-B721-4955-8889-55CB149C3B5C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {09C0C8D8-B721-4955-8889-55CB149C3B5C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {09C0C8D8-B721-4955-8889-55CB149C3B5C}.Debug|x64.ActiveCfg = Debug|Any CPU
- {09C0C8D8-B721-4955-8889-55CB149C3B5C}.Debug|x64.Build.0 = Debug|Any CPU
- {09C0C8D8-B721-4955-8889-55CB149C3B5C}.Debug|x86.ActiveCfg = Debug|Any CPU
- {09C0C8D8-B721-4955-8889-55CB149C3B5C}.Debug|x86.Build.0 = Debug|Any CPU
- {09C0C8D8-B721-4955-8889-55CB149C3B5C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {09C0C8D8-B721-4955-8889-55CB149C3B5C}.Release|Any CPU.Build.0 = Release|Any CPU
- {09C0C8D8-B721-4955-8889-55CB149C3B5C}.Release|x64.ActiveCfg = Release|Any CPU
- {09C0C8D8-B721-4955-8889-55CB149C3B5C}.Release|x64.Build.0 = Release|Any CPU
- {09C0C8D8-B721-4955-8889-55CB149C3B5C}.Release|x86.ActiveCfg = Release|Any CPU
- {09C0C8D8-B721-4955-8889-55CB149C3B5C}.Release|x86.Build.0 = Release|Any CPU
+ {9D36BE59-7C14-448B-984D-93A0E7816314}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {9D36BE59-7C14-448B-984D-93A0E7816314}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {9D36BE59-7C14-448B-984D-93A0E7816314}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {9D36BE59-7C14-448B-984D-93A0E7816314}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {9D36BE59-7C14-448B-984D-93A0E7816314}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {9D36BE59-7C14-448B-984D-93A0E7816314}.Release|Any CPU.Build.0 = Release|Any CPU
+ {9D36BE59-7C14-448B-984D-93A0E7816314}.Release|x64.ActiveCfg = Release|Any CPU
+ {9D36BE59-7C14-448B-984D-93A0E7816314}.Release|x86.ActiveCfg = Release|Any CPU
+ {27FA7CD3-8DCD-4104-9AB4-B2D927F421B5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {27FA7CD3-8DCD-4104-9AB4-B2D927F421B5}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {27FA7CD3-8DCD-4104-9AB4-B2D927F421B5}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {27FA7CD3-8DCD-4104-9AB4-B2D927F421B5}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {27FA7CD3-8DCD-4104-9AB4-B2D927F421B5}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {27FA7CD3-8DCD-4104-9AB4-B2D927F421B5}.Release|Any CPU.Build.0 = Release|Any CPU
+ {27FA7CD3-8DCD-4104-9AB4-B2D927F421B5}.Release|x64.ActiveCfg = Release|Any CPU
+ {27FA7CD3-8DCD-4104-9AB4-B2D927F421B5}.Release|x86.ActiveCfg = Release|Any CPU
+ {99BAF03C-362B-41FA-9FFF-67F697EFC28C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {99BAF03C-362B-41FA-9FFF-67F697EFC28C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {99BAF03C-362B-41FA-9FFF-67F697EFC28C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {99BAF03C-362B-41FA-9FFF-67F697EFC28C}.Debug|x64.Build.0 = Debug|Any CPU
+ {99BAF03C-362B-41FA-9FFF-67F697EFC28C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {99BAF03C-362B-41FA-9FFF-67F697EFC28C}.Debug|x86.Build.0 = Debug|Any CPU
+ {99BAF03C-362B-41FA-9FFF-67F697EFC28C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {99BAF03C-362B-41FA-9FFF-67F697EFC28C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {99BAF03C-362B-41FA-9FFF-67F697EFC28C}.Release|x64.ActiveCfg = Release|Any CPU
+ {99BAF03C-362B-41FA-9FFF-67F697EFC28C}.Release|x64.Build.0 = Release|Any CPU
+ {99BAF03C-362B-41FA-9FFF-67F697EFC28C}.Release|x86.ActiveCfg = Release|Any CPU
+ {99BAF03C-362B-41FA-9FFF-67F697EFC28C}.Release|x86.Build.0 = Release|Any CPU
+ {1CC0831C-ED1D-442E-8421-331D50BD41F1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1CC0831C-ED1D-442E-8421-331D50BD41F1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1CC0831C-ED1D-442E-8421-331D50BD41F1}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {1CC0831C-ED1D-442E-8421-331D50BD41F1}.Debug|x64.Build.0 = Debug|Any CPU
+ {1CC0831C-ED1D-442E-8421-331D50BD41F1}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {1CC0831C-ED1D-442E-8421-331D50BD41F1}.Debug|x86.Build.0 = Debug|Any CPU
+ {1CC0831C-ED1D-442E-8421-331D50BD41F1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1CC0831C-ED1D-442E-8421-331D50BD41F1}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1CC0831C-ED1D-442E-8421-331D50BD41F1}.Release|x64.ActiveCfg = Release|Any CPU
+ {1CC0831C-ED1D-442E-8421-331D50BD41F1}.Release|x64.Build.0 = Release|Any CPU
+ {1CC0831C-ED1D-442E-8421-331D50BD41F1}.Release|x86.ActiveCfg = Release|Any CPU
+ {1CC0831C-ED1D-442E-8421-331D50BD41F1}.Release|x86.Build.0 = Release|Any CPU
+ {3AB43764-C57A-4B75-8C03-C671D3925BF3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3AB43764-C57A-4B75-8C03-C671D3925BF3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3AB43764-C57A-4B75-8C03-C671D3925BF3}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {3AB43764-C57A-4B75-8C03-C671D3925BF3}.Debug|x64.Build.0 = Debug|Any CPU
+ {3AB43764-C57A-4B75-8C03-C671D3925BF3}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {3AB43764-C57A-4B75-8C03-C671D3925BF3}.Debug|x86.Build.0 = Debug|Any CPU
+ {3AB43764-C57A-4B75-8C03-C671D3925BF3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3AB43764-C57A-4B75-8C03-C671D3925BF3}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3AB43764-C57A-4B75-8C03-C671D3925BF3}.Release|x64.ActiveCfg = Release|Any CPU
+ {3AB43764-C57A-4B75-8C03-C671D3925BF3}.Release|x64.Build.0 = Release|Any CPU
+ {3AB43764-C57A-4B75-8C03-C671D3925BF3}.Release|x86.ActiveCfg = Release|Any CPU
+ {3AB43764-C57A-4B75-8C03-C671D3925BF3}.Release|x86.Build.0 = Release|Any CPU
+ {623792C0-5B7D-4D7D-A276-73F908FD4C34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {623792C0-5B7D-4D7D-A276-73F908FD4C34}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {623792C0-5B7D-4D7D-A276-73F908FD4C34}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {623792C0-5B7D-4D7D-A276-73F908FD4C34}.Debug|x64.Build.0 = Debug|Any CPU
+ {623792C0-5B7D-4D7D-A276-73F908FD4C34}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {623792C0-5B7D-4D7D-A276-73F908FD4C34}.Debug|x86.Build.0 = Debug|Any CPU
+ {623792C0-5B7D-4D7D-A276-73F908FD4C34}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {623792C0-5B7D-4D7D-A276-73F908FD4C34}.Release|Any CPU.Build.0 = Release|Any CPU
+ {623792C0-5B7D-4D7D-A276-73F908FD4C34}.Release|x64.ActiveCfg = Release|Any CPU
+ {623792C0-5B7D-4D7D-A276-73F908FD4C34}.Release|x64.Build.0 = Release|Any CPU
+ {623792C0-5B7D-4D7D-A276-73F908FD4C34}.Release|x86.ActiveCfg = Release|Any CPU
+ {623792C0-5B7D-4D7D-A276-73F908FD4C34}.Release|x86.Build.0 = Release|Any CPU
+ {CAF331F8-9255-4D72-A1A8-A54141E99F1E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {CAF331F8-9255-4D72-A1A8-A54141E99F1E}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {CAF331F8-9255-4D72-A1A8-A54141E99F1E}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {CAF331F8-9255-4D72-A1A8-A54141E99F1E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {CAF331F8-9255-4D72-A1A8-A54141E99F1E}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {CAF331F8-9255-4D72-A1A8-A54141E99F1E}.Release|Any CPU.Build.0 = Release|Any CPU
+ {CAF331F8-9255-4D72-A1A8-A54141E99F1E}.Release|x64.ActiveCfg = Release|Any CPU
+ {CAF331F8-9255-4D72-A1A8-A54141E99F1E}.Release|x86.ActiveCfg = Release|Any CPU
+ {4F15A8F8-5BC6-45A1-BC51-03F921B726A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4F15A8F8-5BC6-45A1-BC51-03F921B726A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4F15A8F8-5BC6-45A1-BC51-03F921B726A4}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {4F15A8F8-5BC6-45A1-BC51-03F921B726A4}.Debug|x64.Build.0 = Debug|Any CPU
+ {4F15A8F8-5BC6-45A1-BC51-03F921B726A4}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {4F15A8F8-5BC6-45A1-BC51-03F921B726A4}.Debug|x86.Build.0 = Debug|Any CPU
+ {4F15A8F8-5BC6-45A1-BC51-03F921B726A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4F15A8F8-5BC6-45A1-BC51-03F921B726A4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4F15A8F8-5BC6-45A1-BC51-03F921B726A4}.Release|x64.ActiveCfg = Release|Any CPU
+ {4F15A8F8-5BC6-45A1-BC51-03F921B726A4}.Release|x64.Build.0 = Release|Any CPU
+ {4F15A8F8-5BC6-45A1-BC51-03F921B726A4}.Release|x86.ActiveCfg = Release|Any CPU
+ {4F15A8F8-5BC6-45A1-BC51-03F921B726A4}.Release|x86.Build.0 = Release|Any CPU
+ {8788FF65-C2B6-40B2-A3A0-1E3D91C02664}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8788FF65-C2B6-40B2-A3A0-1E3D91C02664}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8788FF65-C2B6-40B2-A3A0-1E3D91C02664}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {8788FF65-C2B6-40B2-A3A0-1E3D91C02664}.Debug|x64.Build.0 = Debug|Any CPU
+ {8788FF65-C2B6-40B2-A3A0-1E3D91C02664}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8788FF65-C2B6-40B2-A3A0-1E3D91C02664}.Debug|x86.Build.0 = Debug|Any CPU
+ {8788FF65-C2B6-40B2-A3A0-1E3D91C02664}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8788FF65-C2B6-40B2-A3A0-1E3D91C02664}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8788FF65-C2B6-40B2-A3A0-1E3D91C02664}.Release|x64.ActiveCfg = Release|Any CPU
+ {8788FF65-C2B6-40B2-A3A0-1E3D91C02664}.Release|x64.Build.0 = Release|Any CPU
+ {8788FF65-C2B6-40B2-A3A0-1E3D91C02664}.Release|x86.ActiveCfg = Release|Any CPU
+ {8788FF65-C2B6-40B2-A3A0-1E3D91C02664}.Release|x86.Build.0 = Release|Any CPU
+ {65BF5960-3D9B-4230-99F4-A12CAA130792}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {65BF5960-3D9B-4230-99F4-A12CAA130792}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {65BF5960-3D9B-4230-99F4-A12CAA130792}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {65BF5960-3D9B-4230-99F4-A12CAA130792}.Debug|x64.Build.0 = Debug|Any CPU
+ {65BF5960-3D9B-4230-99F4-A12CAA130792}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {65BF5960-3D9B-4230-99F4-A12CAA130792}.Debug|x86.Build.0 = Debug|Any CPU
+ {65BF5960-3D9B-4230-99F4-A12CAA130792}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {65BF5960-3D9B-4230-99F4-A12CAA130792}.Release|Any CPU.Build.0 = Release|Any CPU
+ {65BF5960-3D9B-4230-99F4-A12CAA130792}.Release|x64.ActiveCfg = Release|Any CPU
+ {65BF5960-3D9B-4230-99F4-A12CAA130792}.Release|x64.Build.0 = Release|Any CPU
+ {65BF5960-3D9B-4230-99F4-A12CAA130792}.Release|x86.ActiveCfg = Release|Any CPU
+ {65BF5960-3D9B-4230-99F4-A12CAA130792}.Release|x86.Build.0 = Release|Any CPU
+ {778C4EB9-BD65-4C0F-9230-B5CB1D72186A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {778C4EB9-BD65-4C0F-9230-B5CB1D72186A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {778C4EB9-BD65-4C0F-9230-B5CB1D72186A}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {778C4EB9-BD65-4C0F-9230-B5CB1D72186A}.Debug|x64.Build.0 = Debug|Any CPU
+ {778C4EB9-BD65-4C0F-9230-B5CB1D72186A}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {778C4EB9-BD65-4C0F-9230-B5CB1D72186A}.Debug|x86.Build.0 = Debug|Any CPU
+ {778C4EB9-BD65-4C0F-9230-B5CB1D72186A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {778C4EB9-BD65-4C0F-9230-B5CB1D72186A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {778C4EB9-BD65-4C0F-9230-B5CB1D72186A}.Release|x64.ActiveCfg = Release|Any CPU
+ {778C4EB9-BD65-4C0F-9230-B5CB1D72186A}.Release|x64.Build.0 = Release|Any CPU
+ {778C4EB9-BD65-4C0F-9230-B5CB1D72186A}.Release|x86.ActiveCfg = Release|Any CPU
+ {778C4EB9-BD65-4C0F-9230-B5CB1D72186A}.Release|x86.Build.0 = Release|Any CPU
+ {03032A2F-664D-4DD8-A82F-AD8A482EDD85}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {03032A2F-664D-4DD8-A82F-AD8A482EDD85}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {03032A2F-664D-4DD8-A82F-AD8A482EDD85}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {03032A2F-664D-4DD8-A82F-AD8A482EDD85}.Debug|x64.Build.0 = Debug|Any CPU
+ {03032A2F-664D-4DD8-A82F-AD8A482EDD85}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {03032A2F-664D-4DD8-A82F-AD8A482EDD85}.Debug|x86.Build.0 = Debug|Any CPU
+ {03032A2F-664D-4DD8-A82F-AD8A482EDD85}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {03032A2F-664D-4DD8-A82F-AD8A482EDD85}.Release|Any CPU.Build.0 = Release|Any CPU
+ {03032A2F-664D-4DD8-A82F-AD8A482EDD85}.Release|x64.ActiveCfg = Release|Any CPU
+ {03032A2F-664D-4DD8-A82F-AD8A482EDD85}.Release|x64.Build.0 = Release|Any CPU
+ {03032A2F-664D-4DD8-A82F-AD8A482EDD85}.Release|x86.ActiveCfg = Release|Any CPU
+ {03032A2F-664D-4DD8-A82F-AD8A482EDD85}.Release|x86.Build.0 = Release|Any CPU
+ {92BFF50F-BF96-43AD-AB86-A8B861C32412}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {92BFF50F-BF96-43AD-AB86-A8B861C32412}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {92BFF50F-BF96-43AD-AB86-A8B861C32412}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {92BFF50F-BF96-43AD-AB86-A8B861C32412}.Debug|x64.Build.0 = Debug|Any CPU
+ {92BFF50F-BF96-43AD-AB86-A8B861C32412}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {92BFF50F-BF96-43AD-AB86-A8B861C32412}.Debug|x86.Build.0 = Debug|Any CPU
+ {92BFF50F-BF96-43AD-AB86-A8B861C32412}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {92BFF50F-BF96-43AD-AB86-A8B861C32412}.Release|Any CPU.Build.0 = Release|Any CPU
+ {92BFF50F-BF96-43AD-AB86-A8B861C32412}.Release|x64.ActiveCfg = Release|Any CPU
+ {92BFF50F-BF96-43AD-AB86-A8B861C32412}.Release|x64.Build.0 = Release|Any CPU
+ {92BFF50F-BF96-43AD-AB86-A8B861C32412}.Release|x86.ActiveCfg = Release|Any CPU
+ {92BFF50F-BF96-43AD-AB86-A8B861C32412}.Release|x86.Build.0 = Release|Any CPU
+ {DF0FCFB2-CB12-44BA-BBB5-1BE0BCFCD14C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {DF0FCFB2-CB12-44BA-BBB5-1BE0BCFCD14C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {DF0FCFB2-CB12-44BA-BBB5-1BE0BCFCD14C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {DF0FCFB2-CB12-44BA-BBB5-1BE0BCFCD14C}.Debug|x64.Build.0 = Debug|Any CPU
+ {DF0FCFB2-CB12-44BA-BBB5-1BE0BCFCD14C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {DF0FCFB2-CB12-44BA-BBB5-1BE0BCFCD14C}.Debug|x86.Build.0 = Debug|Any CPU
+ {DF0FCFB2-CB12-44BA-BBB5-1BE0BCFCD14C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {DF0FCFB2-CB12-44BA-BBB5-1BE0BCFCD14C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {DF0FCFB2-CB12-44BA-BBB5-1BE0BCFCD14C}.Release|x64.ActiveCfg = Release|Any CPU
+ {DF0FCFB2-CB12-44BA-BBB5-1BE0BCFCD14C}.Release|x64.Build.0 = Release|Any CPU
+ {DF0FCFB2-CB12-44BA-BBB5-1BE0BCFCD14C}.Release|x86.ActiveCfg = Release|Any CPU
+ {DF0FCFB2-CB12-44BA-BBB5-1BE0BCFCD14C}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
- {C0EC9E70-EB2E-436F-9D94-FA16FA774123} = {7A2B7ADD-ECB5-4D00-AA6A-D45BD11C97CF}
- {97EE048B-16C0-43F6-BDA9-4E762B2F579F} = {026FBC6C-AF76-4568-9B87-EC73457899FD}
- {0B959765-40D2-43B5-87EE-FE2FEF9DBED5} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}
- {570165EC-62B5-4684-A139-8D2A30DD4475} = {026FBC6C-AF76-4568-9B87-EC73457899FD}
- {73DA578D-A63F-4956-83ED-6D7102E09140} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}
- {6D4BD85A-A262-44C6-8572-FE3A30410BF3} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}
{026FBC6C-AF76-4568-9B87-EC73457899FD} = {7A2B7ADD-ECB5-4D00-AA6A-D45BD11C97CF}
- {FBFB0B0B-EA86-4B41-AB2A-E0249F70C86D} = {026FBC6C-AF76-4568-9B87-EC73457899FD}
- {1F604666-BB0F-413E-922D-9D37C6073285} = {076E1AE4-FD25-4684-B826-CAAE37FEA0AA}
- {CF2C1EB6-8449-4B35-B8C7-F43D6D90632D} = {026FBC6C-AF76-4568-9B87-EC73457899FD}
- {9CD2C116-D133-4FE4-97DA-A9FEAFF045F1} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}
- {F4097194-9415-418A-AB4E-315C5D5466AF} = {026FBC6C-AF76-4568-9B87-EC73457899FD}
- {6DFA30D7-1679-4333-9779-6FB678E48EF5} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}
- {09C0C8D8-B721-4955-8889-55CB149C3B5C} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}
+ {9D36BE59-7C14-448B-984D-93A0E7816314} = {7A2B7ADD-ECB5-4D00-AA6A-D45BD11C97CF}
+ {27FA7CD3-8DCD-4104-9AB4-B2D927F421B5} = {026FBC6C-AF76-4568-9B87-EC73457899FD}
+ {99BAF03C-362B-41FA-9FFF-67F697EFC28C} = {026FBC6C-AF76-4568-9B87-EC73457899FD}
+ {1CC0831C-ED1D-442E-8421-331D50BD41F1} = {026FBC6C-AF76-4568-9B87-EC73457899FD}
+ {3AB43764-C57A-4B75-8C03-C671D3925BF3} = {026FBC6C-AF76-4568-9B87-EC73457899FD}
+ {623792C0-5B7D-4D7D-A276-73F908FD4C34} = {026FBC6C-AF76-4568-9B87-EC73457899FD}
+ {CAF331F8-9255-4D72-A1A8-A54141E99F1E} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}
+ {4F15A8F8-5BC6-45A1-BC51-03F921B726A4} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}
+ {8788FF65-C2B6-40B2-A3A0-1E3D91C02664} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}
+ {65BF5960-3D9B-4230-99F4-A12CAA130792} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}
+ {778C4EB9-BD65-4C0F-9230-B5CB1D72186A} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}
+ {03032A2F-664D-4DD8-A82F-AD8A482EDD85} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}
+ {DF0FCFB2-CB12-44BA-BBB5-1BE0BCFCD14C} = {076E1AE4-FD25-4684-B826-CAAE37FEA0AA}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {A2421882-8F0A-4905-928F-B550B192F9A4}
diff --git a/README.md b/README.md
index d0a5bb2cf2..3085181b1e 100644
--- a/README.md
+++ b/README.md
@@ -42,7 +42,7 @@ See [the documentation](https://json-api-dotnet.github.io/#/) for detailed usage
```csharp
public class Article : Identifiable
-{
+{
[Attr("name")]
public string Name { get; set; }
}
@@ -91,7 +91,7 @@ Running tests locally requires access to a postgresql database.
If you have docker installed, this can be propped up via:
```bash
-docker run --rm --name jsonapi-dotnet-core-testing -e POSTGRES_DB=JsonApiDotNetCoreExample -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 postgres
+docker run --rm --name jsonapi-dotnet-core-testing -e POSTGRES_DB=JsonApiDotNetCoreExample -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -p 5432:5432 postgres
```
And then to run the tests:
diff --git a/benchmarks/LinkBuilder/LinkBuilder_ GetNamespaceFromPath_Benchmarks.cs b/benchmarks/LinkBuilder/LinkBuilder_ GetNamespaceFromPath_Benchmarks.cs
index 05728321c3..1432afecd8 100644
--- a/benchmarks/LinkBuilder/LinkBuilder_ GetNamespaceFromPath_Benchmarks.cs
+++ b/benchmarks/LinkBuilder/LinkBuilder_ GetNamespaceFromPath_Benchmarks.cs
@@ -1,10 +1,11 @@
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Attributes.Exporters;
using BenchmarkDotNet.Attributes.Jobs;
+using System;
namespace Benchmarks.LinkBuilder
{
- [MarkdownExporter, SimpleJob(launchCount : 3, warmupCount : 10, targetCount : 20), MemoryDiagnoser]
+ [MarkdownExporter, SimpleJob(launchCount: 3, warmupCount: 10, targetCount: 20), MemoryDiagnoser]
public class LinkBuilder_GetNamespaceFromPath_Benchmarks
{
private const string PATH = "/api/some-really-long-namespace-path/resources/current/articles";
@@ -14,7 +15,7 @@ public class LinkBuilder_GetNamespaceFromPath_Benchmarks
public void UsingSplit() => GetNamespaceFromPath_BySplitting(PATH, ENTITY_NAME);
[Benchmark]
- public void Current() => GetNameSpaceFromPath_Current(PATH, ENTITY_NAME);
+ public void Current() => GetNameSpaceFromPathCurrent(PATH, ENTITY_NAME);
public static string GetNamespaceFromPath_BySplitting(string path, string entityName)
{
@@ -32,7 +33,38 @@ public static string GetNamespaceFromPath_BySplitting(string path, string entity
return nSpace;
}
- public static string GetNameSpaceFromPath_Current(string path, string entityName)
- => JsonApiDotNetCore.Builders.LinkBuilder.GetNamespaceFromPath(path, entityName);
+ public static string GetNameSpaceFromPathCurrent(string path, string entityName)
+ {
+
+ var entityNameSpan = entityName.AsSpan();
+ var pathSpan = path.AsSpan();
+ const char delimiter = '/';
+ for (var i = 0; i < pathSpan.Length; i++)
+ {
+ if (pathSpan[i].Equals(delimiter))
+ {
+ var nextPosition = i + 1;
+ if (pathSpan.Length > i + entityNameSpan.Length)
+ {
+ var possiblePathSegment = pathSpan.Slice(nextPosition, entityNameSpan.Length);
+ if (entityNameSpan.SequenceEqual(possiblePathSegment))
+ {
+ // check to see if it's the last position in the string
+ // or if the next character is a /
+ var lastCharacterPosition = nextPosition + entityNameSpan.Length;
+
+ if (lastCharacterPosition == pathSpan.Length || pathSpan.Length >= lastCharacterPosition + 2 && pathSpan[lastCharacterPosition].Equals(delimiter))
+ {
+ return pathSpan.Slice(0, i).ToString();
+ }
+ }
+ }
+ }
+ }
+
+ return string.Empty;
+
+
+ }
}
}
diff --git a/benchmarks/Program.cs b/benchmarks/Program.cs
index 9a2c45dffb..0ec4c80e14 100644
--- a/benchmarks/Program.cs
+++ b/benchmarks/Program.cs
@@ -1,4 +1,4 @@
-using BenchmarkDotNet.Running;
+using BenchmarkDotNet.Running;
using Benchmarks.JsonApiContext;
using Benchmarks.LinkBuilder;
using Benchmarks.Query;
@@ -10,7 +10,7 @@ class Program {
static void Main(string[] args) {
var switcher = new BenchmarkSwitcher(new[] {
typeof(JsonApiDeserializer_Benchmarks),
- typeof(JsonApiSerializer_Benchmarks),
+ //typeof(JsonApiSerializer_Benchmarks),
typeof(QueryParser_Benchmarks),
typeof(LinkBuilder_GetNamespaceFromPath_Benchmarks),
typeof(ContainsMediaTypeParameters_Benchmarks),
diff --git a/benchmarks/Query/QueryParser_Benchmarks.cs b/benchmarks/Query/QueryParser_Benchmarks.cs
index de82baa60f..19819c3609 100644
--- a/benchmarks/Query/QueryParser_Benchmarks.cs
+++ b/benchmarks/Query/QueryParser_Benchmarks.cs
@@ -5,6 +5,7 @@
using BenchmarkDotNet.Attributes.Jobs;
using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Internal;
+using JsonApiDotNetCore.Managers.Contracts;
using JsonApiDotNetCore.Models;
using JsonApiDotNetCore.Services;
using Microsoft.AspNetCore.Http.Internal;
@@ -21,14 +22,14 @@ public class QueryParser_Benchmarks {
private const string DESCENDING_SORT = "-" + ATTRIBUTE;
public QueryParser_Benchmarks() {
- var controllerContextMock = new Mock();
- controllerContextMock.Setup(m => m.RequestEntity).Returns(new ContextEntity {
+ var requestMock = new Mock();
+ requestMock.Setup(m => m.GetContextEntity()).Returns(new ContextEntity {
Attributes = new List {
new AttrAttribute(ATTRIBUTE, ATTRIBUTE)
}
});
var options = new JsonApiOptions();
- _queryParser = new BenchmarkFacade(controllerContextMock.Object, options);
+ _queryParser = new BenchmarkFacade(requestMock.Object, options);
}
[Benchmark]
@@ -58,8 +59,8 @@ private void Run(int iterations, Action action) {
// this facade allows us to expose and micro-benchmark protected methods
private class BenchmarkFacade : QueryParser {
public BenchmarkFacade(
- IControllerContext controllerContext,
- JsonApiOptions options) : base(controllerContext, options) { }
+ IRequestManager requestManager,
+ JsonApiOptions options) : base(requestManager, options) { }
public void _ParseSortParameters(string value) => base.ParseSortParameters(value);
}
diff --git a/benchmarks/Serialization/JsonApiDeserializer_Benchmarks.cs b/benchmarks/Serialization/JsonApiDeserializer_Benchmarks.cs
index 983bc07f90..15478a5c52 100644
--- a/benchmarks/Serialization/JsonApiDeserializer_Benchmarks.cs
+++ b/benchmarks/Serialization/JsonApiDeserializer_Benchmarks.cs
@@ -4,7 +4,7 @@
using BenchmarkDotNet.Attributes.Exporters;
using JsonApiDotNetCore.Builders;
using JsonApiDotNetCore.Configuration;
-using JsonApiDotNetCore.Internal.Generics;
+using JsonApiDotNetCore.Managers.Contracts;
using JsonApiDotNetCore.Models;
using JsonApiDotNetCore.Serialization;
using JsonApiDotNetCore.Services;
@@ -12,7 +12,8 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
-namespace Benchmarks.Serialization {
+namespace Benchmarks.Serialization
+{
[MarkdownExporter]
public class JsonApiDeserializer_Benchmarks {
private const string TYPE_NAME = "simple-types";
@@ -35,18 +36,21 @@ public JsonApiDeserializer_Benchmarks() {
var resourceGraphBuilder = new ResourceGraphBuilder();
resourceGraphBuilder.AddResource(TYPE_NAME);
var resourceGraph = resourceGraphBuilder.Build();
+ var requestManagerMock = new Mock();
+
+ requestManagerMock.Setup(m => m.GetUpdatedAttributes()).Returns(new Dictionary());
var jsonApiContextMock = new Mock();
jsonApiContextMock.SetupAllProperties();
jsonApiContextMock.Setup(m => m.ResourceGraph).Returns(resourceGraph);
- jsonApiContextMock.Setup(m => m.AttributesToUpdate).Returns(new Dictionary());
+ jsonApiContextMock.Setup(m => m.RequestManager.GetUpdatedAttributes()).Returns(new Dictionary());
var jsonApiOptions = new JsonApiOptions();
jsonApiOptions.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
jsonApiContextMock.Setup(m => m.Options).Returns(jsonApiOptions);
- _jsonApiDeSerializer = new JsonApiDeSerializer(jsonApiContextMock.Object);
+ _jsonApiDeSerializer = new JsonApiDeSerializer(jsonApiContextMock.Object, requestManagerMock.Object);
}
[Benchmark]
diff --git a/benchmarks/Serialization/JsonApiSerializer_Benchmarks.cs b/benchmarks/Serialization/JsonApiSerializer_Benchmarks.cs
index d80540434b..1238cc082f 100644
--- a/benchmarks/Serialization/JsonApiSerializer_Benchmarks.cs
+++ b/benchmarks/Serialization/JsonApiSerializer_Benchmarks.cs
@@ -1,49 +1,49 @@
-using System.Collections.Generic;
-using BenchmarkDotNet.Attributes;
-using BenchmarkDotNet.Attributes.Exporters;
-using JsonApiDotNetCore.Builders;
-using JsonApiDotNetCore.Configuration;
-using JsonApiDotNetCore.Internal.Generics;
-using JsonApiDotNetCore.Models;
-using JsonApiDotNetCore.Serialization;
-using JsonApiDotNetCore.Services;
-using Moq;
-using Newtonsoft.Json.Serialization;
-
-namespace Benchmarks.Serialization {
- [MarkdownExporter]
- public class JsonApiSerializer_Benchmarks {
- private const string TYPE_NAME = "simple-types";
- private static readonly SimpleType Content = new SimpleType();
-
- private readonly JsonApiSerializer _jsonApiSerializer;
-
- public JsonApiSerializer_Benchmarks() {
- var resourceGraphBuilder = new ResourceGraphBuilder();
- resourceGraphBuilder.AddResource(TYPE_NAME);
- var resourceGraph = resourceGraphBuilder.Build();
-
- var jsonApiContextMock = new Mock();
- jsonApiContextMock.SetupAllProperties();
- jsonApiContextMock.Setup(m => m.ResourceGraph).Returns(resourceGraph);
- jsonApiContextMock.Setup(m => m.AttributesToUpdate).Returns(new Dictionary());
-
- var jsonApiOptions = new JsonApiOptions();
- jsonApiOptions.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
- jsonApiContextMock.Setup(m => m.Options).Returns(jsonApiOptions);
-
- var genericProcessorFactoryMock = new Mock();
-
- var documentBuilder = new DocumentBuilder(jsonApiContextMock.Object);
- _jsonApiSerializer = new JsonApiSerializer(jsonApiContextMock.Object, documentBuilder);
- }
-
- [Benchmark]
- public object SerializeSimpleObject() => _jsonApiSerializer.Serialize(Content);
-
- private class SimpleType : Identifiable {
- [Attr("name")]
- public string Name { get; set; }
- }
- }
-}
+//using System.Collections.Generic;
+//using BenchmarkDotNet.Attributes;
+//using BenchmarkDotNet.Attributes.Exporters;
+//using JsonApiDotNetCore.Builders;
+//using JsonApiDotNetCore.Configuration;
+//using JsonApiDotNetCore.Internal.Generics;
+//using JsonApiDotNetCore.Models;
+//using JsonApiDotNetCore.Serialization;
+//using JsonApiDotNetCore.Services;
+//using Moq;
+//using Newtonsoft.Json.Serialization;
+
+//namespace Benchmarks.Serialization {
+// [MarkdownExporter]
+// public class JsonApiSerializer_Benchmarks {
+// private const string TYPE_NAME = "simple-types";
+// private static readonly SimpleType Content = new SimpleType();
+
+// private readonly JsonApiSerializer _jsonApiSerializer;
+
+// public JsonApiSerializer_Benchmarks() {
+// var resourceGraphBuilder = new ResourceGraphBuilder();
+// resourceGraphBuilder.AddResource(TYPE_NAME);
+// var resourceGraph = resourceGraphBuilder.Build();
+
+// var jsonApiContextMock = new Mock();
+// jsonApiContextMock.SetupAllProperties();
+// jsonApiContextMock.Setup(m => m.ResourceGraph).Returns(resourceGraph);
+// jsonApiContextMock.Setup(m => m.AttributesToUpdate).Returns(new Dictionary());
+
+// var jsonApiOptions = new JsonApiOptions();
+// jsonApiOptions.SerializerSettings.ContractResolver = new CamelCasePropertyNamesContractResolver();
+// jsonApiContextMock.Setup(m => m.Options).Returns(jsonApiOptions);
+
+// var genericProcessorFactoryMock = new Mock();
+
+// var documentBuilder = new DocumentBuilder(jsonApiContextMock.Object);
+// _jsonApiSerializer = new JsonApiSerializer(jsonApiContextMock.Object, documentBuilder);
+// }
+
+// [Benchmark]
+// public object SerializeSimpleObject() => _jsonApiSerializer.Serialize(Content);
+
+// private class SimpleType : Identifiable {
+// [Attr("name")]
+// public string Name { get; set; }
+// }
+// }
+//}
diff --git a/docs/obsoletes.md b/docs/obsoletes.md
new file mode 100644
index 0000000000..31a60249f2
--- /dev/null
+++ b/docs/obsoletes.md
@@ -0,0 +1,3 @@
+# For v5
+
+* Anything to do with JsonApiContext, make it internal and fix anything related to it.
\ No newline at end of file
diff --git a/markdownlint.config b/markdownlint.config
new file mode 100644
index 0000000000..8f376b5c2a
--- /dev/null
+++ b/markdownlint.config
@@ -0,0 +1,5 @@
+{
+ "MD033": {
+ "allowed_elements": [ "p", "img", "p" ]
+ }
+}
\ No newline at end of file
diff --git a/src/Examples/GettingStarted/Controllers/ArticlesController.cs b/src/Examples/GettingStarted/Controllers/ArticlesController.cs
index 53517540b1..2d1567659b 100644
--- a/src/Examples/GettingStarted/Controllers/ArticlesController.cs
+++ b/src/Examples/GettingStarted/Controllers/ArticlesController.cs
@@ -1,5 +1,7 @@
using GettingStarted.Models;
+using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Controllers;
+using JsonApiDotNetCore.Internal.Contracts;
using JsonApiDotNetCore.Services;
namespace GettingStarted
@@ -7,9 +9,10 @@ namespace GettingStarted
public class ArticlesController : JsonApiController
{
public ArticlesController(
- IJsonApiContext jsonApiContext,
- IResourceService resourceService)
- : base(jsonApiContext, resourceService)
+ IJsonApiOptions jsonApiOptions,
+ IResourceGraph resourceGraph,
+ IResourceService resourceService)
+ : base(jsonApiOptions, resourceGraph, resourceService)
{ }
}
-}
\ No newline at end of file
+}
diff --git a/src/Examples/GettingStarted/Controllers/PeopleController.cs b/src/Examples/GettingStarted/Controllers/PeopleController.cs
index f3c0c4b868..8d8ee58a2a 100644
--- a/src/Examples/GettingStarted/Controllers/PeopleController.cs
+++ b/src/Examples/GettingStarted/Controllers/PeopleController.cs
@@ -1,5 +1,7 @@
using GettingStarted.Models;
+using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Controllers;
+using JsonApiDotNetCore.Internal.Contracts;
using JsonApiDotNetCore.Services;
namespace GettingStarted
@@ -7,9 +9,10 @@ namespace GettingStarted
public class PeopleController : JsonApiController
{
public PeopleController(
- IJsonApiContext jsonApiContext,
- IResourceService resourceService)
- : base(jsonApiContext, resourceService)
+ IJsonApiOptions jsonApiOptions,
+ IResourceGraph resourceGraph,
+ IResourceService resourceService)
+ : base(jsonApiOptions, resourceGraph, resourceService)
{ }
}
-}
\ No newline at end of file
+}
diff --git a/src/Examples/GettingStarted/GettingStarted.csproj b/src/Examples/GettingStarted/GettingStarted.csproj
index ece976d5e5..e29e94ce6a 100644
--- a/src/Examples/GettingStarted/GettingStarted.csproj
+++ b/src/Examples/GettingStarted/GettingStarted.csproj
@@ -14,9 +14,9 @@
-
-
-
+
+
+
diff --git a/src/Examples/GettingStarted/Properties/launchSettings.json b/src/Examples/GettingStarted/Properties/launchSettings.json
index a0f317edf0..417b2e9f1e 100644
--- a/src/Examples/GettingStarted/Properties/launchSettings.json
+++ b/src/Examples/GettingStarted/Properties/launchSettings.json
@@ -1,24 +1,12 @@
{
- "iisSettings": {
- "windowsAuthentication": false,
- "anonymousAuthentication": true,
- "iisExpress": {
- "applicationUrl": "http://localhost:56042/",
- "sslPort": 0
- }
- },
"profiles": {
- "IIS Express": {
- "commandName": "IISExpress",
- "launchBrowser": true,
- "environmentVariables": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- }
- },
"GettingStarted": {
"commandName": "Project",
"launchBrowser": true,
- "environmentVariables": {}
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "https://localhost:5001;http://localhost:5000"
}
}
}
\ No newline at end of file
diff --git a/src/Examples/GettingStarted/ResourceDefinitionExample/ModelDefinition.cs b/src/Examples/GettingStarted/ResourceDefinitionExample/ModelDefinition.cs
index e9581fc401..d31458250c 100644
--- a/src/Examples/GettingStarted/ResourceDefinitionExample/ModelDefinition.cs
+++ b/src/Examples/GettingStarted/ResourceDefinitionExample/ModelDefinition.cs
@@ -1,5 +1,5 @@
using System.Collections.Generic;
-using JsonApiDotNetCore.Internal;
+using JsonApiDotNetCore.Internal.Contracts;
using JsonApiDotNetCore.Models;
namespace GettingStarted.ResourceDefinitionExample
@@ -18,4 +18,4 @@ public ModelDefinition(IResourceGraph graph) : base(graph)
protected override List OutputAttrs()
=> Remove(model => model.DontExpose);
}
-}
\ No newline at end of file
+}
diff --git a/src/Examples/GettingStarted/ResourceDefinitionExample/ModelsController.cs b/src/Examples/GettingStarted/ResourceDefinitionExample/ModelsController.cs
index a14394e830..1c066c28c9 100644
--- a/src/Examples/GettingStarted/ResourceDefinitionExample/ModelsController.cs
+++ b/src/Examples/GettingStarted/ResourceDefinitionExample/ModelsController.cs
@@ -1,5 +1,6 @@
-using GettingStarted.Models;
+using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Controllers;
+using JsonApiDotNetCore.Internal.Contracts;
using JsonApiDotNetCore.Services;
namespace GettingStarted.ResourceDefinitionExample
@@ -7,9 +8,10 @@ namespace GettingStarted.ResourceDefinitionExample
public class ModelsController : JsonApiController
{
public ModelsController(
- IJsonApiContext jsonApiContext,
- IResourceService resourceService)
- : base(jsonApiContext, resourceService)
+ IJsonApiOptions jsonApiOptions,
+ IResourceGraph resourceGraph,
+ IResourceService resourceService)
+ : base(jsonApiOptions, resourceGraph, resourceService)
{ }
}
-}
\ No newline at end of file
+}
diff --git a/src/Examples/GettingStarted/Startup.cs b/src/Examples/GettingStarted/Startup.cs
index 5d0fa8dc91..d5c805282b 100644
--- a/src/Examples/GettingStarted/Startup.cs
+++ b/src/Examples/GettingStarted/Startup.cs
@@ -20,11 +20,10 @@ public void ConfigureServices(IServiceCollection services)
options.UseSqlite("Data Source=sample.db");
});
- var mvcCoreBuilder = services.AddMvcCore();
+ var mvcBuilder = services.AddMvcCore();
services.AddJsonApi(
options => options.Namespace = "api",
- mvcCoreBuilder,
- discover => discover.AddCurrentAssembly());
+ discover => discover.AddCurrentAssembly(), mvcBuilder);
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, SampleDbContext context)
diff --git a/src/Examples/JsonApiDotNetCoreExample/Controllers/ArticlesController.cs b/src/Examples/JsonApiDotNetCoreExample/Controllers/ArticlesController.cs
index 95aa7d69f9..abf6ce50ea 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Controllers/ArticlesController.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Controllers/ArticlesController.cs
@@ -1,4 +1,6 @@
+using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Controllers;
+using JsonApiDotNetCore.Internal.Contracts;
using JsonApiDotNetCore.Services;
using JsonApiDotNetCoreExample.Models;
@@ -7,9 +9,10 @@ namespace JsonApiDotNetCoreExample.Controllers
public class ArticlesController : JsonApiController
{
public ArticlesController(
- IJsonApiContext jsonApiContext,
+ IJsonApiOptions jsonApiOptions,
+ IResourceGraph resourceGraph,
IResourceService resourceService)
- : base(jsonApiContext, resourceService)
+ : base(jsonApiOptions, resourceGraph, resourceService)
{ }
}
-}
\ No newline at end of file
+}
diff --git a/src/Examples/JsonApiDotNetCoreExample/Controllers/CamelCasedModelsController.cs b/src/Examples/JsonApiDotNetCoreExample/Controllers/CamelCasedModelsController.cs
index e46b3f8efd..c46a9aa094 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Controllers/CamelCasedModelsController.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Controllers/CamelCasedModelsController.cs
@@ -1,4 +1,6 @@
+using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Controllers;
+using JsonApiDotNetCore.Internal.Contracts;
using JsonApiDotNetCore.Services;
using JsonApiDotNetCoreExample.Models;
using Microsoft.AspNetCore.Mvc;
@@ -11,10 +13,11 @@ namespace JsonApiDotNetCoreExample.Controllers
public class CamelCasedModelsController : JsonApiController
{
public CamelCasedModelsController(
- IJsonApiContext jsonApiContext,
+ IJsonApiOptions jsonApiOptions,
+ IResourceGraph resourceGraph,
IResourceService resourceService,
ILoggerFactory loggerFactory)
- : base(jsonApiContext, resourceService, loggerFactory)
+ : base(jsonApiOptions, resourceGraph, resourceService, loggerFactory)
{ }
}
}
diff --git a/src/Examples/JsonApiDotNetCoreExample/Controllers/PassportsController.cs b/src/Examples/JsonApiDotNetCoreExample/Controllers/PassportsController.cs
index 28a47eb419..5c6cab290d 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Controllers/PassportsController.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Controllers/PassportsController.cs
@@ -8,8 +8,8 @@ public class PassportsController : JsonApiController
{
public PassportsController(
IJsonApiContext jsonApiContext,
- IResourceService resourceService)
+ IResourceService resourceService)
: base(jsonApiContext, resourceService)
{ }
}
-}
\ No newline at end of file
+}
diff --git a/src/Examples/JsonApiDotNetCoreExample/Controllers/PeopleController.cs b/src/Examples/JsonApiDotNetCoreExample/Controllers/PeopleController.cs
index e249e2af53..d29cafe508 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Controllers/PeopleController.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Controllers/PeopleController.cs
@@ -1,4 +1,6 @@
+using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Controllers;
+using JsonApiDotNetCore.Internal.Contracts;
using JsonApiDotNetCore.Services;
using JsonApiDotNetCoreExample.Models;
using Microsoft.Extensions.Logging;
@@ -8,10 +10,11 @@ namespace JsonApiDotNetCoreExample.Controllers
public class PeopleController : JsonApiController
{
public PeopleController(
- IJsonApiContext jsonApiContext,
+ IJsonApiOptions jsonApiOptions,
+ IResourceGraph resourceGraph,
IResourceService resourceService,
ILoggerFactory loggerFactory)
- : base(jsonApiContext, resourceService, loggerFactory)
+ : base(jsonApiOptions, resourceGraph, resourceService, loggerFactory)
{ }
}
}
diff --git a/src/Examples/JsonApiDotNetCoreExample/Controllers/PersonRolesController.cs b/src/Examples/JsonApiDotNetCoreExample/Controllers/PersonRolesController.cs
index dbc3b482f5..0234eb6899 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Controllers/PersonRolesController.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Controllers/PersonRolesController.cs
@@ -1,4 +1,6 @@
+using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Controllers;
+using JsonApiDotNetCore.Internal.Contracts;
using JsonApiDotNetCore.Services;
using JsonApiDotNetCoreExample.Models;
using Microsoft.Extensions.Logging;
@@ -8,10 +10,11 @@ namespace JsonApiDotNetCoreExample.Controllers
public class PersonRolesController : JsonApiController
{
public PersonRolesController(
- IJsonApiContext jsonApiContext,
+ IJsonApiOptions jsonApiOptions,
+ IResourceGraph resourceGraph,
IResourceService resourceService,
ILoggerFactory loggerFactory)
- : base(jsonApiContext, resourceService, loggerFactory)
+ : base(jsonApiOptions, resourceGraph, resourceService, loggerFactory)
{ }
}
}
diff --git a/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoCollectionsController.cs b/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoCollectionsController.cs
index 6a27038191..56bc6fda48 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoCollectionsController.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoCollectionsController.cs
@@ -1,8 +1,10 @@
using System;
using System.Linq;
using System.Threading.Tasks;
+using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Controllers;
using JsonApiDotNetCore.Data;
+using JsonApiDotNetCore.Internal.Contracts;
using JsonApiDotNetCore.Services;
using JsonApiDotNetCoreExample.Models;
using Microsoft.AspNetCore.Mvc;
@@ -13,18 +15,17 @@ namespace JsonApiDotNetCoreExample.Controllers
{
public class TodoCollectionsController : JsonApiController
{
-
readonly IDbContextResolver _dbResolver;
- public TodoCollectionsController(
- IDbContextResolver contextResolver,
- IJsonApiContext jsonApiContext,
- IResourceService resourceService,
- ILoggerFactory loggerFactory)
- : base(jsonApiContext, resourceService, loggerFactory)
+ public TodoCollectionsController(
+ IJsonApiOptions jsonApiOptions,
+ IResourceGraph resourceGraph,
+ IDbContextResolver contextResolver,
+ IResourceService resourceService,
+ ILoggerFactory loggerFactory)
+ : base(jsonApiOptions, resourceGraph, resourceService, loggerFactory)
{
_dbResolver = contextResolver;
-
}
[HttpPatch("{id}")]
@@ -40,4 +41,4 @@ public override async Task PatchAsync(Guid id, [FromBody] TodoIte
}
}
-}
\ No newline at end of file
+}
diff --git a/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsController.cs b/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsController.cs
index 768dd1c37c..c7f3a6244e 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsController.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsController.cs
@@ -1,4 +1,6 @@
+using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Controllers;
+using JsonApiDotNetCore.Internal.Contracts;
using JsonApiDotNetCore.Services;
using JsonApiDotNetCoreExample.Models;
using Microsoft.Extensions.Logging;
@@ -8,10 +10,11 @@ namespace JsonApiDotNetCoreExample.Controllers
public class TodoItemsController : JsonApiController
{
public TodoItemsController(
- IJsonApiContext jsonApiContext,
+ IJsonApiOptions jsonApiOPtions,
+ IResourceGraph resourceGraph,
IResourceService resourceService,
ILoggerFactory loggerFactory)
- : base(jsonApiContext, resourceService, loggerFactory)
+ : base(jsonApiOPtions, resourceGraph, resourceService, loggerFactory)
{ }
}
}
diff --git a/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsCustomController.cs b/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsCustomController.cs
index ca2e860fa9..17b11215c4 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsCustomController.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsCustomController.cs
@@ -9,8 +9,7 @@
namespace JsonApiDotNetCoreExample.Controllers
{
- [DisableRoutingConvention]
- [Route("custom/route/todo-items")]
+ [DisableRoutingConvention, Route("custom/route/todo-items")]
public class TodoItemsCustomController : CustomJsonApiController
{
public TodoItemsCustomController(
diff --git a/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsTestController.cs b/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsTestController.cs
index 9bab3cf544..18e566dc07 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsTestController.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsTestController.cs
@@ -1,4 +1,6 @@
+using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Controllers;
+using JsonApiDotNetCore.Internal.Contracts;
using JsonApiDotNetCore.Models;
using JsonApiDotNetCore.Services;
using JsonApiDotNetCoreExample.Models;
@@ -11,10 +13,11 @@ public abstract class AbstractTodoItemsController
: JsonApiController where T : class, IIdentifiable
{
protected AbstractTodoItemsController(
- IJsonApiContext jsonApiContext,
+ IJsonApiOptions jsonApiOptions,
+ IResourceGraph resourceGraph,
IResourceService service,
ILoggerFactory loggerFactory)
- : base(jsonApiContext, service, loggerFactory)
+ : base(jsonApiOptions, resourceGraph, service, loggerFactory)
{ }
}
@@ -22,10 +25,11 @@ protected AbstractTodoItemsController(
public class TodoItemsTestController : AbstractTodoItemsController
{
public TodoItemsTestController(
- IJsonApiContext jsonApiContext,
+ IJsonApiOptions jsonApiOptions,
+ IResourceGraph resourceGraph,
IResourceService service,
ILoggerFactory loggerFactory)
- : base(jsonApiContext, service, loggerFactory)
+ : base(jsonApiOptions, resourceGraph, service, loggerFactory)
{ }
}
}
diff --git a/src/Examples/JsonApiDotNetCoreExample/Controllers/UsersController.cs b/src/Examples/JsonApiDotNetCoreExample/Controllers/UsersController.cs
index dbd144caa4..475b93b300 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Controllers/UsersController.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Controllers/UsersController.cs
@@ -1,4 +1,6 @@
+using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Controllers;
+using JsonApiDotNetCore.Internal.Contracts;
using JsonApiDotNetCore.Services;
using JsonApiDotNetCoreExample.Models;
using Microsoft.Extensions.Logging;
@@ -8,10 +10,11 @@ namespace JsonApiDotNetCoreExample.Controllers
public class UsersController : JsonApiController
{
public UsersController(
- IJsonApiContext jsonApiContext,
+ IJsonApiOptions jsonApiOptions,
+ IResourceGraph resourceGraph,
IResourceService resourceService,
ILoggerFactory loggerFactory)
- : base(jsonApiContext, resourceService, loggerFactory)
+ : base(jsonApiOptions, resourceGraph, resourceService, loggerFactory)
{ }
}
}
diff --git a/src/Examples/JsonApiDotNetCoreExample/Data/AppDbContext.cs b/src/Examples/JsonApiDotNetCoreExample/Data/AppDbContext.cs
index d7147123f6..6a6f7994fb 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Data/AppDbContext.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Data/AppDbContext.cs
@@ -92,5 +92,9 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
public DbSet ArticleTags { get; set; }
public DbSet IdentifiableArticleTags { get; set; }
public DbSet Tags { get; set; }
+
+
}
+
+
}
diff --git a/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj b/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj
index d56e91f21e..92f1bf4fa0 100644
--- a/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj
+++ b/src/Examples/JsonApiDotNetCoreExample/JsonApiDotNetCoreExample.csproj
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/src/Examples/JsonApiDotNetCoreExample/Resources/ArticleResource.cs b/src/Examples/JsonApiDotNetCoreExample/Resources/ArticleResource.cs
index 66429f175c..1e3230c759 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Resources/ArticleResource.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Resources/ArticleResource.cs
@@ -5,8 +5,7 @@
using JsonApiDotNetCore.Models;
using JsonApiDotNetCore.Hooks;
using JsonApiDotNetCoreExample.Models;
-using Microsoft.Extensions.Logging;
-using System.Security.Principal;
+using JsonApiDotNetCore.Internal.Contracts;
namespace JsonApiDotNetCoreExample.Resources
{
diff --git a/src/Examples/JsonApiDotNetCoreExample/Resources/LockableResource.cs b/src/Examples/JsonApiDotNetCoreExample/Resources/LockableResource.cs
index 7ad9659f18..59af8be86b 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Resources/LockableResource.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Resources/LockableResource.cs
@@ -1,7 +1,8 @@
-using System;
+using System;
using System.Collections.Generic;
using System.Linq;
using JsonApiDotNetCore.Internal;
+using JsonApiDotNetCore.Internal.Contracts;
using JsonApiDotNetCore.Models;
using JsonApiDotNetCoreExample.Models;
diff --git a/src/Examples/JsonApiDotNetCoreExample/Resources/PassportResource.cs b/src/Examples/JsonApiDotNetCoreExample/Resources/PassportResource.cs
index 457468c484..ba8b722277 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Resources/PassportResource.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Resources/PassportResource.cs
@@ -5,6 +5,7 @@
using JsonApiDotNetCore.Models;
using JsonApiDotNetCore.Hooks;
using JsonApiDotNetCoreExample.Models;
+using JsonApiDotNetCore.Internal.Contracts;
namespace JsonApiDotNetCoreExample.Resources
{
diff --git a/src/Examples/JsonApiDotNetCoreExample/Resources/PersonResource.cs b/src/Examples/JsonApiDotNetCoreExample/Resources/PersonResource.cs
index 4887414e73..d07e750681 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Resources/PersonResource.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Resources/PersonResource.cs
@@ -1,8 +1,8 @@
using System.Collections.Generic;
using System.Linq;
-using JsonApiDotNetCore.Internal;
using JsonApiDotNetCore.Hooks;
using JsonApiDotNetCoreExample.Models;
+using JsonApiDotNetCore.Internal.Contracts;
namespace JsonApiDotNetCoreExample.Resources
{
diff --git a/src/Examples/JsonApiDotNetCoreExample/Resources/TagResource.cs b/src/Examples/JsonApiDotNetCoreExample/Resources/TagResource.cs
index e3b3100ddd..cd266303f3 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Resources/TagResource.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Resources/TagResource.cs
@@ -4,14 +4,13 @@
using JsonApiDotNetCore.Hooks;
using JsonApiDotNetCoreExample.Models;
using JsonApiDotNetCore.Internal;
+using JsonApiDotNetCore.Internal.Contracts;
namespace JsonApiDotNetCoreExample.Resources
{
public class TagResource : ResourceDefinition
{
- public TagResource(IResourceGraph graph) : base(graph)
- {
- }
+ public TagResource(IResourceGraph graph) : base(graph) { }
public override IEnumerable BeforeCreate(IEntityHashSet affected, ResourcePipeline pipeline)
{
diff --git a/src/Examples/JsonApiDotNetCoreExample/Resources/TodoResource.cs b/src/Examples/JsonApiDotNetCoreExample/Resources/TodoResource.cs
index cfba9855d3..1c9f89a7fc 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Resources/TodoResource.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Resources/TodoResource.cs
@@ -4,6 +4,7 @@
using JsonApiDotNetCore.Internal;
using JsonApiDotNetCore.Hooks;
using JsonApiDotNetCoreExample.Models;
+using JsonApiDotNetCore.Internal.Contracts;
namespace JsonApiDotNetCoreExample.Resources
{
diff --git a/src/Examples/JsonApiDotNetCoreExample/Resources/UserResource.cs b/src/Examples/JsonApiDotNetCoreExample/Resources/UserResource.cs
index ec54b6144e..1e32282c47 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Resources/UserResource.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Resources/UserResource.cs
@@ -3,7 +3,8 @@
using JsonApiDotNetCore.Models;
using JsonApiDotNetCoreExample.Models;
using JsonApiDotNetCore.Internal.Query;
-using JsonApiDotNetCore.Internal;
+using JsonApiDotNetCore.Internal.Contracts;
+
namespace JsonApiDotNetCoreExample.Resources
{
diff --git a/src/Examples/JsonApiDotNetCoreExample/Services/CustomArticleService.cs b/src/Examples/JsonApiDotNetCoreExample/Services/CustomArticleService.cs
new file mode 100644
index 0000000000..eb05a54888
--- /dev/null
+++ b/src/Examples/JsonApiDotNetCoreExample/Services/CustomArticleService.cs
@@ -0,0 +1,39 @@
+using JsonApiDotNetCore.Configuration;
+using JsonApiDotNetCore.Data;
+using JsonApiDotNetCore.Hooks;
+using JsonApiDotNetCore.Internal;
+using JsonApiDotNetCore.Internal.Contracts;
+using JsonApiDotNetCore.Managers.Contracts;
+using JsonApiDotNetCore.Services;
+using JsonApiDotNetCoreExample.Models;
+using Microsoft.Extensions.Logging;
+using System.Threading.Tasks;
+
+namespace JsonApiDotNetCoreExample.Services
+{
+ public class CustomArticleService : EntityResourceService
+ {
+ public CustomArticleService(
+ IEntityRepository repository,
+ IJsonApiOptions jsonApiOptions,
+ IRequestManager queryManager,
+ IPageManager pageManager,
+ IResourceGraph resourceGraph,
+ IResourceHookExecutor resourceHookExecutor = null,
+ ILoggerFactory loggerFactory = null
+ ) : base(repository: repository, jsonApiOptions, queryManager, pageManager, resourceGraph:resourceGraph, loggerFactory, resourceHookExecutor)
+ { }
+
+ public override async Task GetAsync(int id)
+ {
+ var newEntity = await base.GetAsync(id);
+ if(newEntity == null)
+ {
+ throw new JsonApiException(404, "The entity could not be found");
+ }
+ newEntity.Name = "None for you Glen Coco";
+ return newEntity;
+ }
+ }
+
+}
diff --git a/src/Examples/JsonApiDotNetCoreExample/Startup.cs b/src/Examples/JsonApiDotNetCoreExample/Startup.cs
index 44784f7eac..047161e324 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Startup.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Startup.cs
@@ -29,9 +29,6 @@ public virtual IServiceProvider ConfigureServices(IServiceCollection services)
{
var loggerFactory = new LoggerFactory();
loggerFactory.AddConsole(LogLevel.Warning);
-
- var mvcBuilder = services.AddMvcCore();
-
services
.AddSingleton(loggerFactory)
.AddDbContext(options => options.UseNpgsql(GetDbConnectionString()), ServiceLifetime.Transient)
@@ -42,7 +39,6 @@ public virtual IServiceProvider ConfigureServices(IServiceCollection services)
options.EnableResourceHooks = true;
options.LoadDatabaseValues = true;
},
- mvcBuilder,
discovery => discovery.AddCurrentAssembly());
return services.BuildServiceProvider();
@@ -55,9 +51,7 @@ public virtual void Configure(
AppDbContext context)
{
context.Database.EnsureCreated();
-
loggerFactory.AddConsole(Config.GetSection("Logging"));
-
app.UseJsonApi();
}
diff --git a/src/Examples/NoEntityFrameworkExample/Controllers/CustomTodoItemsController.cs b/src/Examples/NoEntityFrameworkExample/Controllers/CustomTodoItemsController.cs
index a6ded9749f..4e93d26bea 100644
--- a/src/Examples/NoEntityFrameworkExample/Controllers/CustomTodoItemsController.cs
+++ b/src/Examples/NoEntityFrameworkExample/Controllers/CustomTodoItemsController.cs
@@ -1,4 +1,6 @@
-using JsonApiDotNetCore.Controllers;
+using JsonApiDotNetCore.Configuration;
+using JsonApiDotNetCore.Controllers;
+using JsonApiDotNetCore.Internal.Contracts;
using JsonApiDotNetCore.Services;
using JsonApiDotNetCoreExample.Models;
using Microsoft.Extensions.Logging;
@@ -8,10 +10,11 @@ namespace NoEntityFrameworkExample.Controllers
public class CustomTodoItemsController : JsonApiController
{
public CustomTodoItemsController(
- IJsonApiContext jsonApiContext,
+ IJsonApiOptions jsonApiOptions,
+ IResourceGraph resourceGraph,
IResourceService resourceService,
ILoggerFactory loggerFactory)
- : base(jsonApiContext, resourceService, loggerFactory)
+ : base(jsonApiOptions, resourceGraph, resourceService, loggerFactory)
{ }
}
}
diff --git a/src/Examples/ReportsExample/Controllers/ReportsController.cs b/src/Examples/ReportsExample/Controllers/ReportsController.cs
index 6f431d9291..e421477c20 100644
--- a/src/Examples/ReportsExample/Controllers/ReportsController.cs
+++ b/src/Examples/ReportsExample/Controllers/ReportsController.cs
@@ -1,17 +1,20 @@
-using System.Threading.Tasks;
+using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using JsonApiDotNetCore.Controllers;
using JsonApiDotNetCore.Services;
-
+using JsonApiDotNetCore.Configuration;
+using JsonApiDotNetCore.Internal.Contracts;
+
namespace ReportsExample.Controllers
{
[Route("api/[controller]")]
public class ReportsController : BaseJsonApiController
{
- public ReportsController(
- IJsonApiContext jsonApiContext,
+ public ReportsController(
+ IJsonApiOptions jsonApiOptions,
+ IResourceGraph resourceGraph,
IGetAllService getAll)
- : base(jsonApiContext, getAll: getAll)
+ : base(jsonApiOptions, resourceGraph, getAll: getAll)
{ }
[HttpGet]
diff --git a/src/Examples/ReportsExample/Startup.cs b/src/Examples/ReportsExample/Startup.cs
index b71b7fa74a..4f49e87db6 100644
--- a/src/Examples/ReportsExample/Startup.cs
+++ b/src/Examples/ReportsExample/Startup.cs
@@ -27,8 +27,7 @@ public virtual void ConfigureServices(IServiceCollection services)
var mvcBuilder = services.AddMvcCore();
services.AddJsonApi(
opt => opt.Namespace = "api",
- mvcBuilder,
- discovery => discovery.AddCurrentAssembly());
+ discovery => discovery.AddCurrentAssembly(), mvcBuilder);
}
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
diff --git a/src/Examples/ResourceEntitySeparationExample/Controllers/CoursesController.cs b/src/Examples/ResourceEntitySeparationExample/Controllers/CoursesController.cs
index 6809ace0bb..48d280f5cb 100644
--- a/src/Examples/ResourceEntitySeparationExample/Controllers/CoursesController.cs
+++ b/src/Examples/ResourceEntitySeparationExample/Controllers/CoursesController.cs
@@ -1,4 +1,6 @@
+using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Controllers;
+using JsonApiDotNetCore.Internal.Contracts;
using JsonApiDotNetCore.Services;
using JsonApiDotNetCoreExample.Models.Resources;
using Microsoft.Extensions.Logging;
@@ -8,10 +10,11 @@ namespace ResourceEntitySeparationExample.Controllers
public class CoursesController : JsonApiController
{
public CoursesController(
- IJsonApiContext jsonApiContext,
+ IJsonApiOptions jsonApiOptions,
+ IResourceGraph resourceGraph,
IResourceService resourceService,
ILoggerFactory loggerFactory)
- : base(jsonApiContext, resourceService, loggerFactory)
+ : base(jsonApiOptions, resourceGraph, resourceService, loggerFactory)
{ }
}
}
diff --git a/src/Examples/ResourceEntitySeparationExample/Controllers/DepartmentsController.cs b/src/Examples/ResourceEntitySeparationExample/Controllers/DepartmentsController.cs
index 08f3ab33ad..63310743ac 100644
--- a/src/Examples/ResourceEntitySeparationExample/Controllers/DepartmentsController.cs
+++ b/src/Examples/ResourceEntitySeparationExample/Controllers/DepartmentsController.cs
@@ -1,5 +1,7 @@
using System;
+using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Controllers;
+using JsonApiDotNetCore.Internal.Contracts;
using JsonApiDotNetCore.Services;
using JsonApiDotNetCoreExample.Models.Resources;
using Microsoft.Extensions.Logging;
@@ -9,10 +11,11 @@ namespace ResourceEntitySeparationExample.Controllers
public class DepartmentsController : JsonApiController
{
public DepartmentsController(
- IJsonApiContext jsonApiContext,
+ IJsonApiOptions jsonApiOptions,
+ IResourceGraph resourceGraph,
IResourceService resourceService,
ILoggerFactory loggerFactory)
- : base(jsonApiContext, resourceService, loggerFactory)
+ : base(jsonApiOptions, resourceGraph, resourceService, loggerFactory)
{ }
}
}
diff --git a/src/Examples/ResourceEntitySeparationExample/Controllers/StudentsController.cs b/src/Examples/ResourceEntitySeparationExample/Controllers/StudentsController.cs
index 34d5d33031..5f3551849a 100644
--- a/src/Examples/ResourceEntitySeparationExample/Controllers/StudentsController.cs
+++ b/src/Examples/ResourceEntitySeparationExample/Controllers/StudentsController.cs
@@ -1,4 +1,6 @@
+using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Controllers;
+using JsonApiDotNetCore.Internal.Contracts;
using JsonApiDotNetCore.Services;
using JsonApiDotNetCoreExample.Models.Resources;
using Microsoft.Extensions.Logging;
@@ -8,10 +10,11 @@ namespace ResourceEntitySeparationExample.Controllers
public class StudentsController : JsonApiController
{
public StudentsController(
- IJsonApiContext jsonApiContext,
+ IJsonApiOptions jsonApiOptions,
+ IResourceGraph resourceGraph,
IResourceService resourceService,
ILoggerFactory loggerFactory)
- : base(jsonApiContext, resourceService, loggerFactory)
+ : base(jsonApiOptions, resourceGraph, resourceService, loggerFactory)
{ }
}
}
diff --git a/src/Examples/ResourceEntitySeparationExample/Startup.cs b/src/Examples/ResourceEntitySeparationExample/Startup.cs
index a99febfee8..f87dea6935 100644
--- a/src/Examples/ResourceEntitySeparationExample/Startup.cs
+++ b/src/Examples/ResourceEntitySeparationExample/Startup.cs
@@ -43,18 +43,19 @@ public virtual IServiceProvider ConfigureServices(IServiceCollection services)
ServiceLifetime.Transient);
services.AddScoped>();
- var mvcBuilder = services.AddMvcCore();
services.AddJsonApi(options => {
options.Namespace = "api/v1";
options.DefaultPageSize = 10;
options.IncludeTotalRecordCount = true;
- options.BuildResourceGraph((builder) => {
+ options.EnableResourceHooks = false; // not supported with ResourceEntitySeparation
+ options.BuildResourceGraph((builder) =>
+ {
builder.AddResource("courses");
builder.AddResource("departments");
builder.AddResource("students");
});
- }, mvcBuilder);
+ });
services.AddAutoMapper();
services.AddScoped();
diff --git a/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs b/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs
index ad52aeb8bb..b2e9475db8 100644
--- a/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs
+++ b/src/JsonApiDotNetCore/Builders/DocumentBuilder.cs
@@ -4,6 +4,8 @@
using System.Linq;
using JsonApiDotNetCore.Extensions;
using JsonApiDotNetCore.Internal;
+using JsonApiDotNetCore.Internal.Contracts;
+using JsonApiDotNetCore.Managers.Contracts;
using JsonApiDotNetCore.Models;
using JsonApiDotNetCore.Services;
@@ -12,6 +14,8 @@ namespace JsonApiDotNetCore.Builders
///
public class DocumentBuilder : IDocumentBuilder
{
+ private readonly IRequestManager _requestManager;
+ private readonly IPageManager _pageManager;
private readonly IJsonApiContext _jsonApiContext;
private readonly IResourceGraph _resourceGraph;
private readonly IRequestMeta _requestMeta;
@@ -20,11 +24,15 @@ public class DocumentBuilder : IDocumentBuilder
public DocumentBuilder(
IJsonApiContext jsonApiContext,
+ IPageManager pageManager,
+ IRequestManager requestManager,
IRequestMeta requestMeta = null,
IDocumentBuilderOptionsProvider documentBuilderOptionsProvider = null,
IScopedServiceProvider scopedServiceProvider = null)
{
+ _pageManager = pageManager;
_jsonApiContext = jsonApiContext;
+ _requestManager = requestManager ?? jsonApiContext.RequestManager;
_resourceGraph = jsonApiContext.ResourceGraph;
_requestMeta = requestMeta;
_documentBuilderOptions = documentBuilderOptionsProvider?.GetDocumentBuilderOptions() ?? new DocumentBuilderOptions();
@@ -44,7 +52,9 @@ public Document Build(IIdentifiable entity)
};
if (ShouldIncludePageLinks(contextEntity))
- document.Links = _jsonApiContext.PageManager.GetPageLinks(new LinkBuilder(_jsonApiContext));
+ {
+ document.Links = _pageManager.GetPageLinks();
+ }
document.Included = AppendIncludedObject(document.Included, contextEntity, entity);
@@ -66,7 +76,9 @@ public Documents Build(IEnumerable entities)
};
if (ShouldIncludePageLinks(contextEntity))
- documents.Links = _jsonApiContext.PageManager.GetPageLinks(new LinkBuilder(_jsonApiContext));
+ {
+ documents.Links = _pageManager.GetPageLinks();
+ }
foreach (var entity in enumeratedEntities)
{
@@ -80,8 +92,8 @@ public Documents Build(IEnumerable entities)
private Dictionary GetMeta(IIdentifiable entity)
{
var builder = _jsonApiContext.MetaBuilder;
- if (_jsonApiContext.Options.IncludeTotalRecordCount && _jsonApiContext.PageManager.TotalRecords != null)
- builder.Add("total-records", _jsonApiContext.PageManager.TotalRecords);
+ if (_jsonApiContext.Options.IncludeTotalRecordCount && _pageManager.TotalRecords != null)
+ builder.Add("total-records", _pageManager.TotalRecords);
if (_requestMeta != null)
builder.Add(_requestMeta.GetMeta());
@@ -146,9 +158,9 @@ private bool ShouldIncludeAttribute(AttrAttribute attr, object attributeValue, R
{
return OmitNullValuedAttribute(attr, attributeValue) == false
&& attr.InternalAttributeName != nameof(Identifiable.Id)
- && ((_jsonApiContext.QuerySet == null
- || _jsonApiContext.QuerySet.Fields.Count == 0)
- || _jsonApiContext.QuerySet.Fields.Contains(relationship != null ?
+ && ((_requestManager.QuerySet == null
+ || _requestManager.QuerySet.Fields.Count == 0)
+ || _requestManager.QuerySet.Fields.Contains(relationship != null ?
$"{relationship.InternalRelationshipName}.{attr.InternalAttributeName}" :
attr.InternalAttributeName));
}
@@ -171,7 +183,7 @@ private void AddRelationships(ResourceObject data, ContextEntity contextEntity,
private RelationshipData GetRelationshipData(RelationshipAttribute attr, ContextEntity contextEntity, IIdentifiable entity)
{
- var linkBuilder = new LinkBuilder(_jsonApiContext);
+ var linkBuilder = new LinkBuilder(_jsonApiContext.Options,_requestManager);
var relationshipData = new RelationshipData();
@@ -179,10 +191,14 @@ private RelationshipData GetRelationshipData(RelationshipAttribute attr, Context
{
relationshipData.Links = new Links();
if (attr.DocumentLinks.HasFlag(Link.Self))
+ {
relationshipData.Links.Self = linkBuilder.GetSelfRelationLink(contextEntity.EntityName, entity.StringId, attr.PublicRelationshipName);
+ }
if (attr.DocumentLinks.HasFlag(Link.Related))
+ {
relationshipData.Links.Related = linkBuilder.GetRelatedRelationLink(contextEntity.EntityName, entity.StringId, attr.PublicRelationshipName);
+ }
}
// this only includes the navigation property, we need to actually check the navigation property Id
@@ -201,9 +217,9 @@ private RelationshipData GetRelationshipData(RelationshipAttribute attr, Context
private List GetIncludedEntities(List included, ContextEntity rootContextEntity, IIdentifiable rootResource)
{
- if (_jsonApiContext.IncludedRelationships != null)
+ if (_requestManager.IncludedRelationships != null)
{
- foreach (var relationshipName in _jsonApiContext.IncludedRelationships)
+ foreach (var relationshipName in _requestManager.IncludedRelationships)
{
var relationshipChain = relationshipName.Split('.');
diff --git a/src/JsonApiDotNetCore/Builders/IDocumentBuilder.cs b/src/JsonApiDotNetCore/Builders/IDocumentBuilder.cs
index 45ba096447..db20954730 100644
--- a/src/JsonApiDotNetCore/Builders/IDocumentBuilder.cs
+++ b/src/JsonApiDotNetCore/Builders/IDocumentBuilder.cs
@@ -8,7 +8,7 @@ namespace JsonApiDotNetCore.Builders
public interface IDocumentBuilder
{
///
- /// Builds a json:api document from the provided resource instance.
+ /// Builds a Json:Api document from the provided resource instance.
///
/// The resource to convert.
Document Build(IIdentifiable entity);
diff --git a/src/JsonApiDotNetCore/Builders/ILinkBuilder.cs b/src/JsonApiDotNetCore/Builders/ILinkBuilder.cs
new file mode 100644
index 0000000000..c8af9e7dac
--- /dev/null
+++ b/src/JsonApiDotNetCore/Builders/ILinkBuilder.cs
@@ -0,0 +1,11 @@
+using Microsoft.AspNetCore.Http;
+
+namespace JsonApiDotNetCore.Builders
+{
+ public interface ILinkBuilder
+ {
+ string GetPageLink(int pageOffset, int pageSize);
+ string GetRelatedRelationLink(string parent, string parentId, string child);
+ string GetSelfRelationLink(string parent, string parentId, string child);
+ }
+}
diff --git a/src/JsonApiDotNetCore/Builders/IResourceGraphBuilder.cs b/src/JsonApiDotNetCore/Builders/IResourceGraphBuilder.cs
new file mode 100644
index 0000000000..7bcf6aa7ad
--- /dev/null
+++ b/src/JsonApiDotNetCore/Builders/IResourceGraphBuilder.cs
@@ -0,0 +1,81 @@
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Reflection;
+using JsonApiDotNetCore.Configuration;
+using JsonApiDotNetCore.Extensions;
+using JsonApiDotNetCore.Graph;
+using JsonApiDotNetCore.Internal;
+using JsonApiDotNetCore.Internal.Contracts;
+using JsonApiDotNetCore.Models;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.Extensions.Logging;
+
+namespace JsonApiDotNetCore.Builders
+{
+ public interface IResourceGraphBuilder
+ {
+ ///
+ /// Construct the
+ ///
+ IResourceGraph Build();
+
+ ///
+ /// Add a json:api resource
+ ///
+ /// The resource model type
+ ///
+ /// The pluralized name that should be exposed by the API.
+ /// If nothing is specified, the configured name formatter will be used.
+ /// See .
+ ///
+ IResourceGraphBuilder AddResource(string pluralizedTypeName = null) where TResource : class, IIdentifiable;
+
+ IResourceGraphBuilder AddControllerPairing(Type controller, Type model = null);
+
+ ///
+ /// Add a json:api resource
+ ///
+ /// The resource model type
+ /// The resource model identifier type
+ ///
+ /// The pluralized name that should be exposed by the API.
+ /// If nothing is specified, the configured name formatter will be used.
+ /// See .
+ ///
+ IResourceGraphBuilder AddResource(string pluralizedTypeName = null) where TResource : class, IIdentifiable;
+
+ ///
+ /// Add a Json:Api resource
+ ///
+ /// The resource model type
+ /// The resource model identifier type
+ ///
+ /// The pluralized name that should be exposed by the API.
+ /// If nothing is specified, the configured name formatter will be used.
+ /// See .
+ ///
+ IResourceGraphBuilder AddResource(Type entityType, Type idType, string pluralizedTypeName = null);
+
+ ///
+ /// Add all the models that are part of the provided
+ /// that also implement
+ ///
+ /// The implementation type.
+ IResourceGraphBuilder AddDbContext() where T : DbContext;
+
+ ///
+ /// Specify the used to format resource names.
+ ///
+ /// Formatter used to define exposed resource names by convention.
+ IResourceGraphBuilder UseNameFormatter(IResourceNameFormatter resourceNameFormatter);
+
+ ///
+ /// Which links to include. Defaults to .
+ ///
+ Link DocumentLinks { get; set; }
+
+
+ }
+}
diff --git a/src/JsonApiDotNetCore/Builders/LinkBuilder.cs b/src/JsonApiDotNetCore/Builders/LinkBuilder.cs
index 3de45558c4..9738065ec3 100644
--- a/src/JsonApiDotNetCore/Builders/LinkBuilder.cs
+++ b/src/JsonApiDotNetCore/Builders/LinkBuilder.cs
@@ -1,72 +1,44 @@
-using System;
+using JsonApiDotNetCore.Configuration;
+using JsonApiDotNetCore.Managers.Contracts;
using JsonApiDotNetCore.Services;
-using Microsoft.AspNetCore.Http;
namespace JsonApiDotNetCore.Builders
{
- public class LinkBuilder
+ public class LinkBuilder : ILinkBuilder
{
- private readonly IJsonApiContext _context;
+ private readonly IRequestManager _requestManager;
+ private readonly IJsonApiOptions _options;
- public LinkBuilder(IJsonApiContext context)
+ public LinkBuilder(IJsonApiOptions options, IRequestManager requestManager)
{
- _context = context;
- }
-
- public string GetBasePath(HttpContext context, string entityName)
- {
- var r = context.Request;
- return (_context.Options.RelativeLinks)
- ? GetNamespaceFromPath(r.Path, entityName)
- : $"{r.Scheme}://{r.Host}{GetNamespaceFromPath(r.Path, entityName)}";
- }
-
- internal static string GetNamespaceFromPath(string path, string entityName)
- {
- var entityNameSpan = entityName.AsSpan();
- var pathSpan = path.AsSpan();
- const char delimiter = '/';
- for (var i = 0; i < pathSpan.Length; i++)
- {
- if(pathSpan[i].Equals(delimiter))
- {
- var nextPosition = i + 1;
- if(pathSpan.Length > i + entityNameSpan.Length)
- {
- var possiblePathSegment = pathSpan.Slice(nextPosition, entityNameSpan.Length);
- if (entityNameSpan.SequenceEqual(possiblePathSegment))
- {
- // check to see if it's the last position in the string
- // or if the next character is a /
- var lastCharacterPosition = nextPosition + entityNameSpan.Length;
-
- if(lastCharacterPosition == pathSpan.Length || pathSpan.Length >= lastCharacterPosition + 2 && pathSpan[lastCharacterPosition].Equals(delimiter))
- {
- return pathSpan.Slice(0, i).ToString();
- }
- }
- }
- }
- }
-
- return string.Empty;
+ _options = options;
+ _requestManager = requestManager;
}
+ ///
public string GetSelfRelationLink(string parent, string parentId, string child)
{
- return $"{_context.BasePath}/{parent}/{parentId}/relationships/{child}";
+ return $"{GetBasePath()}/{parent}/{parentId}/relationships/{child}";
}
+ ///
public string GetRelatedRelationLink(string parent, string parentId, string child)
{
- return $"{_context.BasePath}/{parent}/{parentId}/{child}";
+ return $"{GetBasePath()}/{parent}/{parentId}/{child}";
}
+ ///
public string GetPageLink(int pageOffset, int pageSize)
{
var filterQueryComposer = new QueryComposer();
- var filters = filterQueryComposer.Compose(_context);
- return $"{_context.BasePath}/{_context.RequestEntity.EntityName}?page[size]={pageSize}&page[number]={pageOffset}{filters}";
+ var filters = filterQueryComposer.Compose(_requestManager);
+ return $"{GetBasePath()}/{_requestManager.GetContextEntity().EntityName}?page[size]={pageSize}&page[number]={pageOffset}{filters}";
+ }
+
+ private string GetBasePath()
+ {
+ if (_options.RelativeLinks) return string.Empty;
+ return _requestManager.BasePath;
}
}
}
diff --git a/src/JsonApiDotNetCore/Builders/ContextGraphBuilder.cs b/src/JsonApiDotNetCore/Builders/ResourceGraphBuilder.cs
similarity index 78%
rename from src/JsonApiDotNetCore/Builders/ContextGraphBuilder.cs
rename to src/JsonApiDotNetCore/Builders/ResourceGraphBuilder.cs
index dfa6b665a0..2c9d2677ea 100644
--- a/src/JsonApiDotNetCore/Builders/ContextGraphBuilder.cs
+++ b/src/JsonApiDotNetCore/Builders/ResourceGraphBuilder.cs
@@ -7,77 +7,19 @@
using JsonApiDotNetCore.Extensions;
using JsonApiDotNetCore.Graph;
using JsonApiDotNetCore.Internal;
+using JsonApiDotNetCore.Internal.Contracts;
using JsonApiDotNetCore.Models;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
namespace JsonApiDotNetCore.Builders
{
- public interface IResourceGraphBuilder
- {
- ///
- /// Construct the
- ///
- IResourceGraph Build();
-
- ///
- /// Add a json:api resource
- ///
- /// The resource model type
- ///
- /// The pluralized name that should be exposed by the API.
- /// If nothing is specified, the configured name formatter will be used.
- /// See .
- ///
- IResourceGraphBuilder AddResource(string pluralizedTypeName = null) where TResource : class, IIdentifiable;
-
- ///
- /// Add a json:api resource
- ///
- /// The resource model type
- /// The resource model identifier type
- ///
- /// The pluralized name that should be exposed by the API.
- /// If nothing is specified, the configured name formatter will be used.
- /// See .
- ///
- IResourceGraphBuilder AddResource(string pluralizedTypeName = null) where TResource : class, IIdentifiable;
-
- ///
- /// Add a json:api resource
- ///
- /// The resource model type
- /// The resource model identifier type
- ///
- /// The pluralized name that should be exposed by the API.
- /// If nothing is specified, the configured name formatter will be used.
- /// See .
- ///
- IResourceGraphBuilder AddResource(Type entityType, Type idType, string pluralizedTypeName = null);
-
- ///
- /// Add all the models that are part of the provided
- /// that also implement
- ///
- /// The implementation type.
- IResourceGraphBuilder AddDbContext() where T : DbContext;
-
- ///
- /// Specify the used to format resource names.
- ///
- /// Formatter used to define exposed resource names by convention.
- IResourceGraphBuilder UseNameFormatter(IResourceNameFormatter resourceNameFormatter);
-
- ///
- /// Which links to include. Defaults to .
- ///
- Link DocumentLinks { get; set; }
- }
-
public class ResourceGraphBuilder : IResourceGraphBuilder
{
private List _entities = new List();
private List _validationResults = new List();
+ private Dictionary> _controllerMapper = new Dictionary>() { };
+ private List _undefinedMapper = new List() { };
private bool _usesDbContext;
private IResourceNameFormatter _resourceNameFormatter = JsonApiOptions.ResourceNameFormatter;
@@ -90,7 +32,23 @@ public IResourceGraph Build()
// this must be done at build so that call order doesn't matter
_entities.ForEach(e => e.Links = GetLinkFlags(e.EntityType));
- var graph = new ResourceGraph(_entities, _usesDbContext, _validationResults);
+ List controllerContexts = new List() { };
+ foreach(var cm in _controllerMapper)
+ {
+ var model = cm.Key;
+ foreach (var controller in cm.Value)
+ {
+ var controllerName = controller.Name.Replace("Controller", "");
+
+ controllerContexts.Add(new ControllerResourceMap
+ {
+ Resource = model,
+ ControllerName = controllerName,
+ });
+
+ }
+ }
+ var graph = new ResourceGraph(_entities, _usesDbContext, _validationResults, controllerContexts);
return graph;
}
@@ -169,9 +127,7 @@ protected virtual List GetAttributes(Type entityType)
protected virtual List GetRelationships(Type entityType)
{
var attributes = new List();
-
var properties = entityType.GetProperties();
-
foreach (var prop in properties)
{
var attribute = (RelationshipAttribute)prop.GetCustomAttribute(typeof(RelationshipAttribute));
@@ -183,16 +139,17 @@ protected virtual List GetRelationships(Type entityType)
attribute.PrincipalType = entityType;
attributes.Add(attribute);
- if (attribute is HasManyThroughAttribute hasManyThroughAttribute) {
+ if (attribute is HasManyThroughAttribute hasManyThroughAttribute)
+ {
var throughProperty = properties.SingleOrDefault(p => p.Name == hasManyThroughAttribute.InternalThroughName);
- if(throughProperty == null)
+ if (throughProperty == null)
throw new JsonApiSetupException($"Invalid '{nameof(HasManyThroughAttribute)}' on type '{entityType}'. Type does not contain a property named '{hasManyThroughAttribute.InternalThroughName}'.");
-
- if(throughProperty.PropertyType.Implements() == false)
+
+ if (throughProperty.PropertyType.Implements() == false)
throw new JsonApiSetupException($"Invalid '{nameof(HasManyThroughAttribute)}' on type '{entityType}.{throughProperty.Name}'. Property type does not implement IList.");
-
+
// assumption: the property should be a generic collection, e.g. List
- if(throughProperty.PropertyType.IsGenericType == false)
+ if (throughProperty.PropertyType.IsGenericType == false)
throw new JsonApiSetupException($"Invalid '{nameof(HasManyThroughAttribute)}' on type '{entityType}'. Expected through entity to be a generic type, such as List<{prop.PropertyType}>.");
// Article → List
@@ -202,7 +159,7 @@ protected virtual List GetRelationships(Type entityType)
hasManyThroughAttribute.ThroughType = throughProperty.PropertyType.GetGenericArguments()[0];
var throughProperties = hasManyThroughAttribute.ThroughType.GetProperties();
-
+
// ArticleTag.Article
hasManyThroughAttribute.LeftProperty = throughProperties.SingleOrDefault(x => x.PropertyType == entityType)
?? throw new JsonApiSetupException($"{hasManyThroughAttribute.ThroughType} does not contain a navigation property to type {entityType}");
@@ -305,5 +262,24 @@ public IResourceGraphBuilder UseNameFormatter(IResourceNameFormatter resourceNam
_resourceNameFormatter = resourceNameFormatter;
return this;
}
+
+ public IResourceGraphBuilder AddControllerPairing(Type controller, Type model = null)
+ {
+ if (model == null)
+ {
+ _undefinedMapper.Add(controller);
+ return this;
+
+ }
+ if (_controllerMapper.Keys.Contains(model))
+ {
+ _controllerMapper[model].Add(controller);
+ }
+ else
+ {
+ _controllerMapper.Add(model, new List() { controller });
+ }
+ return this;
+ }
}
}
diff --git a/src/JsonApiDotNetCore/Configuration/IJsonApiOptions.cs b/src/JsonApiDotNetCore/Configuration/IJsonApiOptions.cs
new file mode 100644
index 0000000000..2ec70cc331
--- /dev/null
+++ b/src/JsonApiDotNetCore/Configuration/IJsonApiOptions.cs
@@ -0,0 +1,41 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using JsonApiDotNetCore.Internal;
+using JsonApiDotNetCore.Internal.Contracts;
+using JsonApiDotNetCore.Models;
+using Newtonsoft.Json;
+
+namespace JsonApiDotNetCore.Configuration
+{
+ public interface IJsonApiOptions
+ {
+ ///
+ /// Whether or not database values should be included by default
+ /// for resource hooks. Ignored if EnableResourceHooks is set false.
+ ///
+ /// Defaults to .
+ ///
+ bool LoadDatabaseValues { get; set; }
+ ///
+ /// Whether or not the total-record count should be included in all document
+ /// level meta objects.
+ /// Defaults to false.
+ ///
+ ///
+ /// options.IncludeTotalRecordCount = true;
+ ///
+ bool IncludeTotalRecordCount { get; set; }
+ int DefaultPageSize { get; }
+ bool ValidateModelState { get; }
+ bool AllowClientGeneratedIds { get; }
+ JsonSerializerSettings SerializerSettings { get; }
+ bool EnableOperations { get; set; }
+ Link DefaultRelationshipLinks { get; set; }
+ NullAttributeResponseBehavior NullAttributeResponseBehavior { get; set; }
+ bool RelativeLinks { get; set; }
+ IResourceGraph ResourceGraph { get; set; }
+ bool AllowCustomQueryParameters { get; set; }
+ string Namespace { get; set; }
+ }
+}
diff --git a/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs b/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs
index 21efdb97ed..57a4f98396 100644
--- a/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs
+++ b/src/JsonApiDotNetCore/Configuration/JsonApiOptions.cs
@@ -2,19 +2,18 @@
using System.Collections.Generic;
using JsonApiDotNetCore.Builders;
using JsonApiDotNetCore.Graph;
-using JsonApiDotNetCore.Internal;
+using JsonApiDotNetCore.Internal.Contracts;
using JsonApiDotNetCore.Models;
using JsonApiDotNetCore.Serialization;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
-using Newtonsoft.Json.Serialization;
namespace JsonApiDotNetCore.Configuration
{
///
/// Global options
///
- public class JsonApiOptions
+ public class JsonApiOptions : IJsonApiOptions
{
///
@@ -31,7 +30,7 @@ public class JsonApiOptions
/// Whether or not stack traces should be serialized in Error objects
///
public static bool DisableErrorStackTraces { get; set; }
-
+
///
/// Whether or not source URLs should be serialized in Error objects
///
@@ -92,6 +91,7 @@ public class JsonApiOptions
///
/// The graph of all resources exposed by this application.
///
+ [Obsolete("Use the standalone resourcegraph")]
public IResourceGraph ResourceGraph { get; set; }
///
diff --git a/src/JsonApiDotNetCore/Controllers/BaseJsonApiController.cs b/src/JsonApiDotNetCore/Controllers/BaseJsonApiController.cs
index 93fd4826e2..1194bca652 100644
--- a/src/JsonApiDotNetCore/Controllers/BaseJsonApiController.cs
+++ b/src/JsonApiDotNetCore/Controllers/BaseJsonApiController.cs
@@ -1,41 +1,17 @@
+ using System;
using System.Collections.Generic;
using System.Threading.Tasks;
+using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Extensions;
using JsonApiDotNetCore.Internal;
+using JsonApiDotNetCore.Internal.Contracts;
using JsonApiDotNetCore.Models;
using JsonApiDotNetCore.Services;
using Microsoft.AspNetCore.Mvc;
+using Microsoft.Extensions.Logging;
namespace JsonApiDotNetCore.Controllers
{
- public class BaseJsonApiController
- : BaseJsonApiController
- where T : class, IIdentifiable
- {
- public BaseJsonApiController(
- IJsonApiContext jsonApiContext,
- IResourceService resourceService
- ) : base(jsonApiContext, resourceService) { }
-
- public BaseJsonApiController(
- IJsonApiContext jsonApiContext,
- IResourceQueryService queryService = null,
- IResourceCmdService cmdService = null
- ) : base(jsonApiContext, queryService, cmdService) { }
-
- public BaseJsonApiController(
- IJsonApiContext jsonApiContext,
- IGetAllService getAll = null,
- IGetByIdService getById = null,
- IGetRelationshipService getRelationship = null,
- IGetRelationshipsService getRelationships = null,
- ICreateService create = null,
- IUpdateService update = null,
- IUpdateRelationshipService updateRelationships = null,
- IDeleteService delete = null
- ) : base(jsonApiContext, getAll, getById, getRelationship, getRelationships, create, update, updateRelationships, delete) { }
- }
-
public class BaseJsonApiController
: JsonApiControllerMixin
where T : class, IIdentifiable
@@ -48,13 +24,26 @@ public class BaseJsonApiController
private readonly IUpdateService _update;
private readonly IUpdateRelationshipService _updateRelationships;
private readonly IDeleteService _delete;
- private readonly IJsonApiContext _jsonApiContext;
+ private readonly ILogger> _logger;
+ private readonly IJsonApiOptions _jsonApiOptions;
+ private readonly IResourceGraph _resourceGraph;
public BaseJsonApiController(
- IJsonApiContext jsonApiContext,
- IResourceService resourceService)
+ IJsonApiOptions jsonApiOptions,
+ IResourceGraph resourceGraphManager,
+ IResourceService resourceService,
+ ILoggerFactory loggerFactory)
{
- _jsonApiContext = jsonApiContext.ApplyContext(this);
+ if(loggerFactory != null)
+ {
+ _logger = loggerFactory.CreateLogger>();
+ }
+ else
+ {
+ _logger = new Logger>(new LoggerFactory());
+ }
+ _jsonApiOptions = jsonApiOptions;
+ _resourceGraph = resourceGraphManager;
_getAll = resourceService;
_getById = resourceService;
_getRelationship = resourceService;
@@ -63,14 +52,20 @@ public BaseJsonApiController(
_update = resourceService;
_updateRelationships = resourceService;
_delete = resourceService;
+ ParseQueryParams();
+ }
+
+ private void ParseQueryParams()
+ {
+
}
public BaseJsonApiController(
- IJsonApiContext jsonApiContext,
+ IJsonApiOptions jsonApiOptions,
IResourceQueryService queryService = null,
IResourceCmdService cmdService = null)
{
- _jsonApiContext = jsonApiContext.ApplyContext(this);
+ _jsonApiOptions = jsonApiOptions;
_getAll = queryService;
_getById = queryService;
_getRelationship = queryService;
@@ -81,8 +76,22 @@ public BaseJsonApiController(
_delete = cmdService;
}
+ ///
+ /// Base constructor
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
public BaseJsonApiController(
- IJsonApiContext jsonApiContext,
+ IJsonApiOptions jsonApiOptions,
+ IResourceGraph resourceGraph,
IGetAllService getAll = null,
IGetByIdService getById = null,
IGetRelationshipService getRelationship = null,
@@ -92,7 +101,8 @@ public BaseJsonApiController(
IUpdateRelationshipService updateRelationships = null,
IDeleteService delete = null)
{
- _jsonApiContext = jsonApiContext.ApplyContext(this);
+ _resourceGraph = resourceGraph;
+ _jsonApiOptions = jsonApiOptions;
_getAll = getAll;
_getById = getById;
_getRelationship = getRelationship;
@@ -106,28 +116,27 @@ public BaseJsonApiController(
public virtual async Task GetAsync()
{
if (_getAll == null) throw Exceptions.UnSupportedRequestMethod;
-
var entities = await _getAll.GetAsync();
-
return Ok(entities);
}
public virtual async Task GetAsync(TId id)
{
if (_getById == null) throw Exceptions.UnSupportedRequestMethod;
-
var entity = await _getById.GetAsync(id);
-
if (entity == null)
+ {
return NotFound();
-
+ }
return Ok(entity);
}
public virtual async Task GetRelationshipsAsync(TId id, string relationshipName)
{
- if (_getRelationships == null) throw Exceptions.UnSupportedRequestMethod;
-
+ if (_getRelationships == null)
+ {
+ throw Exceptions.UnSupportedRequestMethod;
+ }
var relationship = await _getRelationships.GetRelationshipsAsync(id, relationshipName);
if (relationship == null)
return NotFound();
@@ -138,9 +147,7 @@ public virtual async Task GetRelationshipsAsync(TId id, string re
public virtual async Task GetRelationshipAsync(TId id, string relationshipName)
{
if (_getRelationship == null) throw Exceptions.UnSupportedRequestMethod;
-
var relationship = await _getRelationship.GetRelationshipAsync(id, relationshipName);
-
return Ok(relationship);
}
@@ -152,11 +159,13 @@ public virtual async Task PostAsync([FromBody] T entity)
if (entity == null)
return UnprocessableEntity();
- if (!_jsonApiContext.Options.AllowClientGeneratedIds && !string.IsNullOrEmpty(entity.StringId))
+ if (!_jsonApiOptions.AllowClientGeneratedIds && !string.IsNullOrEmpty(entity.StringId))
return Forbidden();
- if (_jsonApiContext.Options.ValidateModelState && !ModelState.IsValid)
- return UnprocessableEntity(ModelState.ConvertToErrorCollection(_jsonApiContext.ResourceGraph));
+ if (_jsonApiOptions.ValidateModelState && !ModelState.IsValid)
+ {
+ return UnprocessableEntity(ModelStateExtensions.ConvertToErrorCollection(ModelState, _resourceGraph));
+ }
entity = await _create.CreateAsync(entity);
@@ -166,12 +175,13 @@ public virtual async Task PostAsync([FromBody] T entity)
public virtual async Task PatchAsync(TId id, [FromBody] T entity)
{
if (_update == null) throw Exceptions.UnSupportedRequestMethod;
-
if (entity == null)
return UnprocessableEntity();
- if (_jsonApiContext.Options.ValidateModelState && !ModelState.IsValid)
- return UnprocessableEntity(ModelState.ConvertToErrorCollection(_jsonApiContext.ResourceGraph));
+ if (_jsonApiOptions.ValidateModelState && !ModelState.IsValid)
+ {
+ return UnprocessableEntity(ModelStateExtensions.ConvertToErrorCollection(ModelState, _resourceGraph));
+ }
var updatedEntity = await _update.UpdateAsync(id, entity);
@@ -184,22 +194,46 @@ public virtual async Task PatchAsync(TId id, [FromBody] T entity)
public virtual async Task PatchRelationshipsAsync(TId id, string relationshipName, [FromBody] List relationships)
{
if (_updateRelationships == null) throw Exceptions.UnSupportedRequestMethod;
-
await _updateRelationships.UpdateRelationshipsAsync(id, relationshipName, relationships);
-
return Ok();
}
public virtual async Task DeleteAsync(TId id)
{
if (_delete == null) throw Exceptions.UnSupportedRequestMethod;
-
var wasDeleted = await _delete.DeleteAsync(id);
-
if (!wasDeleted)
return NotFound();
-
return NoContent();
}
}
+ public class BaseJsonApiController
+ : BaseJsonApiController
+ where T : class, IIdentifiable
+ {
+ public BaseJsonApiController(
+ IJsonApiOptions jsonApiOptions,
+ IResourceService resourceService
+ ) : base(jsonApiOptions, resourceService, resourceService) { }
+
+ public BaseJsonApiController(
+ IJsonApiOptions jsonApiOptions,
+ IResourceQueryService queryService = null,
+ IResourceCmdService cmdService = null
+ ) : base(jsonApiOptions, queryService, cmdService) { }
+
+
+ public BaseJsonApiController(
+ IJsonApiOptions jsonApiOptions,
+ IResourceGraph resourceGraph,
+ IGetAllService getAll = null,
+ IGetByIdService getById = null,
+ IGetRelationshipService getRelationship = null,
+ IGetRelationshipsService getRelationships = null,
+ ICreateService create = null,
+ IUpdateService update = null,
+ IUpdateRelationshipService updateRelationships = null,
+ IDeleteService delete = null
+ ) : base(jsonApiOptions, resourceGraph, getAll, getById, getRelationship, getRelationships, create, update, updateRelationships, delete) { }
+ }
}
diff --git a/src/JsonApiDotNetCore/Controllers/JsonApiCmdController.cs b/src/JsonApiDotNetCore/Controllers/JsonApiCmdController.cs
index 16ab4aa74a..3ee26db3c6 100644
--- a/src/JsonApiDotNetCore/Controllers/JsonApiCmdController.cs
+++ b/src/JsonApiDotNetCore/Controllers/JsonApiCmdController.cs
@@ -1,18 +1,21 @@
using System.Collections.Generic;
using System.Threading.Tasks;
+using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Models;
using JsonApiDotNetCore.Services;
using Microsoft.AspNetCore.Mvc;
namespace JsonApiDotNetCore.Controllers
{
- public class JsonApiCmdController
- : JsonApiCmdController where T : class, IIdentifiable
+ public class JsonApiCmdController : JsonApiCmdController
+ where T : class, IIdentifiable
{
public JsonApiCmdController(
+ IJsonApiOptions jsonApiOptions,
IJsonApiContext jsonApiContext,
IResourceService resourceService)
- : base(jsonApiContext, resourceService)
+ : base(jsonApiOptions,
+ jsonApiContext, resourceService)
{ }
}
@@ -20,9 +23,10 @@ public class JsonApiCmdController
: BaseJsonApiController where T : class, IIdentifiable
{
public JsonApiCmdController(
+ IJsonApiOptions jsonApiOptions,
IJsonApiContext jsonApiContext,
IResourceService resourceService)
- : base(jsonApiContext, resourceService)
+ : base(jsonApiOptions, resourceService)
{ }
[HttpPost]
diff --git a/src/JsonApiDotNetCore/Controllers/JsonApiController.cs b/src/JsonApiDotNetCore/Controllers/JsonApiController.cs
index a77c03da06..3ab5375db8 100644
--- a/src/JsonApiDotNetCore/Controllers/JsonApiController.cs
+++ b/src/JsonApiDotNetCore/Controllers/JsonApiController.cs
@@ -1,5 +1,8 @@
+using System;
using System.Collections.Generic;
using System.Threading.Tasks;
+using JsonApiDotNetCore.Configuration;
+using JsonApiDotNetCore.Internal.Contracts;
using JsonApiDotNetCore.Models;
using JsonApiDotNetCore.Services;
using Microsoft.AspNetCore.Mvc;
@@ -7,53 +10,28 @@
namespace JsonApiDotNetCore.Controllers
{
- public class JsonApiController
- : JsonApiController where T : class, IIdentifiable
- {
- public JsonApiController(
- IJsonApiContext jsonApiContext,
- IResourceService resourceService,
- ILoggerFactory loggerFactory)
- : base(jsonApiContext, resourceService, loggerFactory)
- { }
- public JsonApiController(
- IJsonApiContext jsonApiContext,
- IResourceService resourceService)
- : base(jsonApiContext, resourceService)
- { }
- public JsonApiController(
- IJsonApiContext jsonApiContext,
- IGetAllService getAll = null,
- IGetByIdService getById = null,
- IGetRelationshipService getRelationship = null,
- IGetRelationshipsService getRelationships = null,
- ICreateService create = null,
- IUpdateService update = null,
- IUpdateRelationshipService updateRelationships = null,
- IDeleteService delete = null
- ) : base(jsonApiContext, getAll, getById, getRelationship, getRelationships, create, update, updateRelationships, delete) { }
- }
-
- public class JsonApiController
- : BaseJsonApiController where T : class, IIdentifiable
+ public class JsonApiController : BaseJsonApiController where T : class, IIdentifiable
{
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
+ ///
public JsonApiController(
- IJsonApiContext jsonApiContext,
+ IJsonApiOptions jsonApiOptions,
+ IResourceGraph resourceGraph,
IResourceService resourceService,
- ILoggerFactory loggerFactory)
- : base(jsonApiContext, resourceService)
+ ILoggerFactory loggerFactory = null)
+ : base(jsonApiOptions, resourceGraph, resourceService, loggerFactory = null)
{ }
public JsonApiController(
- IJsonApiContext jsonApiContext,
- IResourceService resourceService)
- : base(jsonApiContext, resourceService)
- { }
-
- public JsonApiController(
- IJsonApiContext jsonApiContext,
+ IJsonApiOptions jsonApiOptions,
+ IResourceGraph resourceGraph,
IGetAllService getAll = null,
IGetByIdService getById = null,
IGetRelationshipService getRelationship = null,
@@ -62,7 +40,7 @@ public JsonApiController(
IUpdateService update = null,
IUpdateRelationshipService updateRelationships = null,
IDeleteService delete = null
- ) : base(jsonApiContext, getAll, getById, getRelationship, getRelationships, create, update, updateRelationships, delete) { }
+ ) : base(jsonApiOptions, resourceGraph, getAll, getById, getRelationship, getRelationships, create, update, updateRelationships, delete) { }
[HttpGet]
public override async Task GetAsync() => await base.GetAsync();
@@ -84,7 +62,9 @@ public override async Task PostAsync([FromBody] T entity)
[HttpPatch("{id}")]
public override async Task PatchAsync(TId id, [FromBody] T entity)
- => await base.PatchAsync(id, entity);
+ {
+ return await base.PatchAsync(id, entity);
+ }
[HttpPatch("{id}/relationships/{relationshipName}")]
public override async Task PatchRelationshipsAsync(
@@ -94,4 +74,59 @@ public override async Task PatchRelationshipsAsync(
[HttpDelete("{id}")]
public override async Task DeleteAsync(TId id) => await base.DeleteAsync(id);
}
+
+ ///
+ /// JsonApiController with int as default
+ ///
+ ///
+ public class JsonApiController : JsonApiController where T : class, IIdentifiable
+ {
+ private IJsonApiOptions jsonApiOptions;
+ private IJsonApiContext jsonApiContext;
+ private IResourceService resourceService;
+ private ILoggerFactory loggerFactory;
+
+
+ ///
+ /// Normal constructor with int as default (old fashioned)
+ ///
+ ///
+ ///
+ [Obsolete("JsonApiContext is Obsolete, use constructor without jsonApiContext")]
+ public JsonApiController(
+ IJsonApiContext context,
+ IResourceService resourceService) : base(context.Options,context.ResourceGraph,resourceService) {
+ }
+
+ ///
+ /// Base constructor with int as default
+ ///
+ ///
+ ///
+ ///
+ ///
+ public JsonApiController(
+ IJsonApiOptions jsonApiOptions,
+ IResourceGraph resourceGraph,
+ IResourceService resourceService,
+ ILoggerFactory loggerFactory = null
+ )
+ : base(jsonApiOptions, resourceGraph, resourceService, loggerFactory)
+ { }
+
+ public JsonApiController(
+ IJsonApiOptions jsonApiOptions,
+ IResourceGraph resourceGraph,
+ IGetAllService getAll = null,
+ IGetByIdService getById = null,
+ IGetRelationshipService getRelationship = null,
+ IGetRelationshipsService getRelationships = null,
+ ICreateService create = null,
+ IUpdateService update = null,
+ IUpdateRelationshipService updateRelationships = null,
+ IDeleteService delete = null
+ ) : base(jsonApiOptions, resourceGraph, getAll, getById, getRelationship, getRelationships, create, update, updateRelationships, delete) { }
+
+
+ }
}
diff --git a/src/JsonApiDotNetCore/Controllers/JsonApiQueryController.cs b/src/JsonApiDotNetCore/Controllers/JsonApiQueryController.cs
index 5211e5fa3b..21ca22a578 100644
--- a/src/JsonApiDotNetCore/Controllers/JsonApiQueryController.cs
+++ b/src/JsonApiDotNetCore/Controllers/JsonApiQueryController.cs
@@ -1,4 +1,5 @@
using System.Threading.Tasks;
+using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Models;
using JsonApiDotNetCore.Services;
using Microsoft.AspNetCore.Mvc;
@@ -9,9 +10,10 @@ public class JsonApiQueryController
: JsonApiQueryController where T : class, IIdentifiable
{
public JsonApiQueryController(
+ IJsonApiOptions jsonApiOptions,
IJsonApiContext jsonApiContext,
IResourceService resourceService)
- : base(jsonApiContext, resourceService)
+ : base(jsonApiOptions, jsonApiContext, resourceService)
{ }
}
@@ -19,9 +21,10 @@ public class JsonApiQueryController
: BaseJsonApiController where T : class, IIdentifiable
{
public JsonApiQueryController(
+ IJsonApiOptions jsonApiOptions,
IJsonApiContext jsonApiContext,
IResourceService resourceService)
- : base(jsonApiContext, resourceService)
+ : base(jsonApiOptions, resourceService)
{ }
[HttpGet]
diff --git a/src/JsonApiDotNetCore/Controllers/QueryParams.cs b/src/JsonApiDotNetCore/Controllers/QueryParams.cs
index 4c963098ad..6e5e3901fb 100644
--- a/src/JsonApiDotNetCore/Controllers/QueryParams.cs
+++ b/src/JsonApiDotNetCore/Controllers/QueryParams.cs
@@ -2,7 +2,7 @@ namespace JsonApiDotNetCore.Controllers
{
public enum QueryParams
{
- Filter = 1 << 0,
+ Filters = 1 << 0,
Sort = 1 << 1,
Include = 1 << 2,
Page = 1 << 3,
diff --git a/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs b/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs
index 889e2f7198..112db1c352 100644
--- a/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs
+++ b/src/JsonApiDotNetCore/Data/DefaultEntityRepository.cs
@@ -7,33 +7,14 @@
using JsonApiDotNetCore.Internal;
using JsonApiDotNetCore.Internal.Generics;
using JsonApiDotNetCore.Internal.Query;
+using JsonApiDotNetCore.Managers.Contracts;
using JsonApiDotNetCore.Models;
using JsonApiDotNetCore.Services;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Logging;
namespace JsonApiDotNetCore.Data
{
- ///
- public class DefaultEntityRepository
- : DefaultEntityRepository,
- IEntityRepository
- where TEntity : class, IIdentifiable
- {
- public DefaultEntityRepository(
- IJsonApiContext jsonApiContext,
- IDbContextResolver contextResolver,
- ResourceDefinition resourceDefinition = null)
- : base(jsonApiContext, contextResolver, resourceDefinition)
- { }
- public DefaultEntityRepository(
- ILoggerFactory loggerFactory,
- IJsonApiContext jsonApiContext,
- IDbContextResolver contextResolver,
- ResourceDefinition resourceDefinition = null)
- : base(loggerFactory, jsonApiContext, contextResolver, resourceDefinition)
- { }
- }
///
/// Provides a default repository implementation and is responsible for
@@ -44,17 +25,21 @@ public class DefaultEntityRepository