diff --git a/JsonApiDotnetCore.sln b/JsonApiDotNetCore.sln
similarity index 91%
rename from JsonApiDotnetCore.sln
rename to JsonApiDotNetCore.sln
index f0dc4e0982..0fc8aa3995 100644
--- a/JsonApiDotnetCore.sln
+++ b/JsonApiDotNetCore.sln
@@ -1,238 +1,223 @@
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.28606.126
-MinimumVisualStudioVersion = 10.0.40219.1
-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("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C5B4D998-CECB-454D-9F32-085A897577BE}"
- ProjectSection(SolutionItems) = preProject
- .gitignore = .gitignore
- .travis.yml = .travis.yml
- appveyor.yml = appveyor.yml
- Build.ps1 = Build.ps1
- build.sh = build.sh
- Directory.Build.props = Directory.Build.props
- README.md = README.md
- EndProjectSection
-EndProject
-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}") = "JsonApiDotNetCoreExampleTests", "test\JsonApiDotNetCoreExampleTests\JsonApiDotNetCoreExampleTests.csproj", "{CAF331F8-9255-4D72-A1A8-A54141E99F1E}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NoEntityFrameworkTests", "test\NoEntityFrameworkTests\NoEntityFrameworkTests.csproj", "{4F15A8F8-5BC6-45A1-BC51-03F921B726A4}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests", "test\UnitTests\UnitTests.csproj", "{8788FF65-C2B6-40B2-A3A0-1E3D91C02664}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DiscoveryTests", "test\DiscoveryTests\DiscoveryTests.csproj", "{03032A2F-664D-4DD8-A82F-AD8A482EDD85}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Benchmarks", "benchmarks\Benchmarks.csproj", "{DF0FCFB2-CB12-44BA-BBB5-1BE0BCFCD14C}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JsonApiDotNetCoreExample", "src\Examples\JsonApiDotNetCoreExample\JsonApiDotNetCoreExample.csproj", "{C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NoEntityFrameworkExample", "src\Examples\NoEntityFrameworkExample\NoEntityFrameworkExample.csproj", "{789085E1-048F-4996-B600-791B9CA3A663}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReportsExample", "src\Examples\ReportsExample\ReportsExample.csproj", "{8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JsonApiDotNetCore", "src\JsonApiDotNetCore\JsonApiDotNetCore.csproj", "{21D27239-138D-4604-8E49-DCBE41BCE4C8}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GettingStarted", "src\Examples\GettingStarted\GettingStarted.csproj", "{067FFD7A-C66B-473D-8471-37F5C95DF61C}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "IntegrationTests", "test\IntegrationTests\IntegrationTests.csproj", "{CEB08B86-6BF1-4227-B20F-45AE9C1CC6D9}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MultiDbContextExample", "src\Examples\MultiDbContextExample\MultiDbContextExample.csproj", "{6CAFDDBE-00AB-4784-801B-AB419C3C3A26}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MultiDbContextTests", "test\MultiDbContextTests\MultiDbContextTests.csproj", "{EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x64 = Debug|x64
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x64 = Release|x64
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {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|x64.Build.0 = Debug|Any CPU
- {CAF331F8-9255-4D72-A1A8-A54141E99F1E}.Debug|x86.ActiveCfg = Debug|Any CPU
- {CAF331F8-9255-4D72-A1A8-A54141E99F1E}.Debug|x86.Build.0 = 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|x64.Build.0 = Release|Any CPU
- {CAF331F8-9255-4D72-A1A8-A54141E99F1E}.Release|x86.ActiveCfg = Release|Any CPU
- {CAF331F8-9255-4D72-A1A8-A54141E99F1E}.Release|x86.Build.0 = 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
- {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
- {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
- {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Debug|x64.ActiveCfg = Debug|Any CPU
- {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Debug|x64.Build.0 = Debug|Any CPU
- {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Debug|x86.ActiveCfg = Debug|Any CPU
- {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Debug|x86.Build.0 = Debug|Any CPU
- {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Release|Any CPU.Build.0 = Release|Any CPU
- {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Release|x64.ActiveCfg = Release|Any CPU
- {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Release|x64.Build.0 = Release|Any CPU
- {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Release|x86.ActiveCfg = Release|Any CPU
- {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Release|x86.Build.0 = Release|Any CPU
- {789085E1-048F-4996-B600-791B9CA3A663}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {789085E1-048F-4996-B600-791B9CA3A663}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {789085E1-048F-4996-B600-791B9CA3A663}.Debug|x64.ActiveCfg = Debug|Any CPU
- {789085E1-048F-4996-B600-791B9CA3A663}.Debug|x64.Build.0 = Debug|Any CPU
- {789085E1-048F-4996-B600-791B9CA3A663}.Debug|x86.ActiveCfg = Debug|Any CPU
- {789085E1-048F-4996-B600-791B9CA3A663}.Debug|x86.Build.0 = Debug|Any CPU
- {789085E1-048F-4996-B600-791B9CA3A663}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {789085E1-048F-4996-B600-791B9CA3A663}.Release|Any CPU.Build.0 = Release|Any CPU
- {789085E1-048F-4996-B600-791B9CA3A663}.Release|x64.ActiveCfg = Release|Any CPU
- {789085E1-048F-4996-B600-791B9CA3A663}.Release|x64.Build.0 = Release|Any CPU
- {789085E1-048F-4996-B600-791B9CA3A663}.Release|x86.ActiveCfg = Release|Any CPU
- {789085E1-048F-4996-B600-791B9CA3A663}.Release|x86.Build.0 = Release|Any CPU
- {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Debug|x64.ActiveCfg = Debug|Any CPU
- {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Debug|x64.Build.0 = Debug|Any CPU
- {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Debug|x86.ActiveCfg = Debug|Any CPU
- {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Debug|x86.Build.0 = Debug|Any CPU
- {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Release|Any CPU.Build.0 = Release|Any CPU
- {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Release|x64.ActiveCfg = Release|Any CPU
- {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Release|x64.Build.0 = Release|Any CPU
- {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Release|x86.ActiveCfg = Release|Any CPU
- {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Release|x86.Build.0 = Release|Any CPU
- {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Debug|x64.ActiveCfg = Debug|Any CPU
- {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Debug|x64.Build.0 = Debug|Any CPU
- {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Debug|x86.ActiveCfg = Debug|Any CPU
- {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Debug|x86.Build.0 = Debug|Any CPU
- {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Release|Any CPU.Build.0 = Release|Any CPU
- {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Release|x64.ActiveCfg = Release|Any CPU
- {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Release|x64.Build.0 = Release|Any CPU
- {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Release|x86.ActiveCfg = Release|Any CPU
- {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Release|x86.Build.0 = Release|Any CPU
- {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Debug|x64.ActiveCfg = Debug|Any CPU
- {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Debug|x64.Build.0 = Debug|Any CPU
- {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Debug|x86.ActiveCfg = Debug|Any CPU
- {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Debug|x86.Build.0 = Debug|Any CPU
- {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Release|Any CPU.Build.0 = Release|Any CPU
- {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Release|x64.ActiveCfg = Release|Any CPU
- {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Release|x64.Build.0 = Release|Any CPU
- {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Release|x86.ActiveCfg = Release|Any CPU
- {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Release|x86.Build.0 = Release|Any CPU
- {CEB08B86-6BF1-4227-B20F-45AE9C1CC6D9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {CEB08B86-6BF1-4227-B20F-45AE9C1CC6D9}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {CEB08B86-6BF1-4227-B20F-45AE9C1CC6D9}.Debug|x64.ActiveCfg = Debug|Any CPU
- {CEB08B86-6BF1-4227-B20F-45AE9C1CC6D9}.Debug|x64.Build.0 = Debug|Any CPU
- {CEB08B86-6BF1-4227-B20F-45AE9C1CC6D9}.Debug|x86.ActiveCfg = Debug|Any CPU
- {CEB08B86-6BF1-4227-B20F-45AE9C1CC6D9}.Debug|x86.Build.0 = Debug|Any CPU
- {CEB08B86-6BF1-4227-B20F-45AE9C1CC6D9}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {CEB08B86-6BF1-4227-B20F-45AE9C1CC6D9}.Release|Any CPU.Build.0 = Release|Any CPU
- {CEB08B86-6BF1-4227-B20F-45AE9C1CC6D9}.Release|x64.ActiveCfg = Release|Any CPU
- {CEB08B86-6BF1-4227-B20F-45AE9C1CC6D9}.Release|x64.Build.0 = Release|Any CPU
- {CEB08B86-6BF1-4227-B20F-45AE9C1CC6D9}.Release|x86.ActiveCfg = Release|Any CPU
- {CEB08B86-6BF1-4227-B20F-45AE9C1CC6D9}.Release|x86.Build.0 = Release|Any CPU
- {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Debug|x64.ActiveCfg = Debug|Any CPU
- {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Debug|x64.Build.0 = Debug|Any CPU
- {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Debug|x86.ActiveCfg = Debug|Any CPU
- {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Debug|x86.Build.0 = Debug|Any CPU
- {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Release|Any CPU.Build.0 = Release|Any CPU
- {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Release|x64.ActiveCfg = Release|Any CPU
- {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Release|x64.Build.0 = Release|Any CPU
- {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Release|x86.ActiveCfg = Release|Any CPU
- {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Release|x86.Build.0 = Release|Any CPU
- {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Debug|x64.ActiveCfg = Debug|Any CPU
- {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Debug|x64.Build.0 = Debug|Any CPU
- {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Debug|x86.ActiveCfg = Debug|Any CPU
- {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Debug|x86.Build.0 = Debug|Any CPU
- {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Release|Any CPU.Build.0 = Release|Any CPU
- {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Release|x64.ActiveCfg = Release|Any CPU
- {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Release|x64.Build.0 = Release|Any CPU
- {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Release|x86.ActiveCfg = Release|Any CPU
- {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Release|x86.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(NestedProjects) = preSolution
- {026FBC6C-AF76-4568-9B87-EC73457899FD} = {7A2B7ADD-ECB5-4D00-AA6A-D45BD11C97CF}
- {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}
- {03032A2F-664D-4DD8-A82F-AD8A482EDD85} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}
- {DF0FCFB2-CB12-44BA-BBB5-1BE0BCFCD14C} = {076E1AE4-FD25-4684-B826-CAAE37FEA0AA}
- {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A} = {026FBC6C-AF76-4568-9B87-EC73457899FD}
- {789085E1-048F-4996-B600-791B9CA3A663} = {026FBC6C-AF76-4568-9B87-EC73457899FD}
- {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B} = {026FBC6C-AF76-4568-9B87-EC73457899FD}
- {21D27239-138D-4604-8E49-DCBE41BCE4C8} = {7A2B7ADD-ECB5-4D00-AA6A-D45BD11C97CF}
- {CEB08B86-6BF1-4227-B20F-45AE9C1CC6D9} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}
- {6CAFDDBE-00AB-4784-801B-AB419C3C3A26} = {026FBC6C-AF76-4568-9B87-EC73457899FD}
- {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {A2421882-8F0A-4905-928F-B550B192F9A4}
- EndGlobalSection
-EndGlobal
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.28606.126
+MinimumVisualStudioVersion = 10.0.40219.1
+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("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C5B4D998-CECB-454D-9F32-085A897577BE}"
+ ProjectSection(SolutionItems) = preProject
+ .gitignore = .gitignore
+ .travis.yml = .travis.yml
+ appveyor.yml = appveyor.yml
+ Build.ps1 = Build.ps1
+ build.sh = build.sh
+ Directory.Build.props = Directory.Build.props
+ README.md = README.md
+ EndProjectSection
+EndProject
+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}") = "JsonApiDotNetCoreExampleTests", "test\JsonApiDotNetCoreExampleTests\JsonApiDotNetCoreExampleTests.csproj", "{CAF331F8-9255-4D72-A1A8-A54141E99F1E}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NoEntityFrameworkTests", "test\NoEntityFrameworkTests\NoEntityFrameworkTests.csproj", "{4F15A8F8-5BC6-45A1-BC51-03F921B726A4}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnitTests", "test\UnitTests\UnitTests.csproj", "{8788FF65-C2B6-40B2-A3A0-1E3D91C02664}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DiscoveryTests", "test\DiscoveryTests\DiscoveryTests.csproj", "{03032A2F-664D-4DD8-A82F-AD8A482EDD85}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Benchmarks", "benchmarks\Benchmarks.csproj", "{DF0FCFB2-CB12-44BA-BBB5-1BE0BCFCD14C}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JsonApiDotNetCoreExample", "src\Examples\JsonApiDotNetCoreExample\JsonApiDotNetCoreExample.csproj", "{C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "NoEntityFrameworkExample", "src\Examples\NoEntityFrameworkExample\NoEntityFrameworkExample.csproj", "{789085E1-048F-4996-B600-791B9CA3A663}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ReportsExample", "src\Examples\ReportsExample\ReportsExample.csproj", "{8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JsonApiDotNetCore", "src\JsonApiDotNetCore\JsonApiDotNetCore.csproj", "{21D27239-138D-4604-8E49-DCBE41BCE4C8}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "GettingStarted", "src\Examples\GettingStarted\GettingStarted.csproj", "{067FFD7A-C66B-473D-8471-37F5C95DF61C}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MultiDbContextExample", "src\Examples\MultiDbContextExample\MultiDbContextExample.csproj", "{6CAFDDBE-00AB-4784-801B-AB419C3C3A26}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MultiDbContextTests", "test\MultiDbContextTests\MultiDbContextTests.csproj", "{EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {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|x64.Build.0 = Debug|Any CPU
+ {CAF331F8-9255-4D72-A1A8-A54141E99F1E}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {CAF331F8-9255-4D72-A1A8-A54141E99F1E}.Debug|x86.Build.0 = 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|x64.Build.0 = Release|Any CPU
+ {CAF331F8-9255-4D72-A1A8-A54141E99F1E}.Release|x86.ActiveCfg = Release|Any CPU
+ {CAF331F8-9255-4D72-A1A8-A54141E99F1E}.Release|x86.Build.0 = 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
+ {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
+ {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
+ {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Debug|x64.Build.0 = Debug|Any CPU
+ {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Debug|x86.Build.0 = Debug|Any CPU
+ {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Release|x64.ActiveCfg = Release|Any CPU
+ {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Release|x64.Build.0 = Release|Any CPU
+ {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Release|x86.ActiveCfg = Release|Any CPU
+ {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A}.Release|x86.Build.0 = Release|Any CPU
+ {789085E1-048F-4996-B600-791B9CA3A663}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {789085E1-048F-4996-B600-791B9CA3A663}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {789085E1-048F-4996-B600-791B9CA3A663}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {789085E1-048F-4996-B600-791B9CA3A663}.Debug|x64.Build.0 = Debug|Any CPU
+ {789085E1-048F-4996-B600-791B9CA3A663}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {789085E1-048F-4996-B600-791B9CA3A663}.Debug|x86.Build.0 = Debug|Any CPU
+ {789085E1-048F-4996-B600-791B9CA3A663}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {789085E1-048F-4996-B600-791B9CA3A663}.Release|Any CPU.Build.0 = Release|Any CPU
+ {789085E1-048F-4996-B600-791B9CA3A663}.Release|x64.ActiveCfg = Release|Any CPU
+ {789085E1-048F-4996-B600-791B9CA3A663}.Release|x64.Build.0 = Release|Any CPU
+ {789085E1-048F-4996-B600-791B9CA3A663}.Release|x86.ActiveCfg = Release|Any CPU
+ {789085E1-048F-4996-B600-791B9CA3A663}.Release|x86.Build.0 = Release|Any CPU
+ {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Debug|x64.Build.0 = Debug|Any CPU
+ {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Debug|x86.Build.0 = Debug|Any CPU
+ {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Release|x64.ActiveCfg = Release|Any CPU
+ {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Release|x64.Build.0 = Release|Any CPU
+ {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Release|x86.ActiveCfg = Release|Any CPU
+ {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B}.Release|x86.Build.0 = Release|Any CPU
+ {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Debug|x64.Build.0 = Debug|Any CPU
+ {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Debug|x86.Build.0 = Debug|Any CPU
+ {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Release|Any CPU.Build.0 = Release|Any CPU
+ {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Release|x64.ActiveCfg = Release|Any CPU
+ {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Release|x64.Build.0 = Release|Any CPU
+ {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Release|x86.ActiveCfg = Release|Any CPU
+ {21D27239-138D-4604-8E49-DCBE41BCE4C8}.Release|x86.Build.0 = Release|Any CPU
+ {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Debug|x64.Build.0 = Debug|Any CPU
+ {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Debug|x86.Build.0 = Debug|Any CPU
+ {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Release|Any CPU.Build.0 = Release|Any CPU
+ {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Release|x64.ActiveCfg = Release|Any CPU
+ {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Release|x64.Build.0 = Release|Any CPU
+ {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Release|x86.ActiveCfg = Release|Any CPU
+ {067FFD7A-C66B-473D-8471-37F5C95DF61C}.Release|x86.Build.0 = Release|Any CPU
+ {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Debug|x64.Build.0 = Debug|Any CPU
+ {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Debug|x86.Build.0 = Debug|Any CPU
+ {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Release|Any CPU.Build.0 = Release|Any CPU
+ {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Release|x64.ActiveCfg = Release|Any CPU
+ {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Release|x64.Build.0 = Release|Any CPU
+ {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Release|x86.ActiveCfg = Release|Any CPU
+ {6CAFDDBE-00AB-4784-801B-AB419C3C3A26}.Release|x86.Build.0 = Release|Any CPU
+ {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Debug|x64.Build.0 = Debug|Any CPU
+ {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Debug|x86.Build.0 = Debug|Any CPU
+ {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Release|x64.ActiveCfg = Release|Any CPU
+ {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Release|x64.Build.0 = Release|Any CPU
+ {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Release|x86.ActiveCfg = Release|Any CPU
+ {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {026FBC6C-AF76-4568-9B87-EC73457899FD} = {7A2B7ADD-ECB5-4D00-AA6A-D45BD11C97CF}
+ {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}
+ {03032A2F-664D-4DD8-A82F-AD8A482EDD85} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}
+ {DF0FCFB2-CB12-44BA-BBB5-1BE0BCFCD14C} = {076E1AE4-FD25-4684-B826-CAAE37FEA0AA}
+ {C916EBDA-3429-4FEA-AFB3-DF7CA32A8C6A} = {026FBC6C-AF76-4568-9B87-EC73457899FD}
+ {789085E1-048F-4996-B600-791B9CA3A663} = {026FBC6C-AF76-4568-9B87-EC73457899FD}
+ {8BCFF95F-4850-427C-AEDB-B5B4F62B2C7B} = {026FBC6C-AF76-4568-9B87-EC73457899FD}
+ {21D27239-138D-4604-8E49-DCBE41BCE4C8} = {7A2B7ADD-ECB5-4D00-AA6A-D45BD11C97CF}
+ {6CAFDDBE-00AB-4784-801B-AB419C3C3A26} = {026FBC6C-AF76-4568-9B87-EC73457899FD}
+ {EC3202C6-1D4C-4B14-A599-B9D3F27FE3BA} = {24B15015-62E5-42E1-9BA0-ECE6BE7AA15F}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {A2421882-8F0A-4905-928F-B550B192F9A4}
+ EndGlobalSection
+EndGlobal
diff --git a/README.md b/README.md
index 9ef855bc27..89bab8e77b 100644
--- a/README.md
+++ b/README.md
@@ -2,7 +2,7 @@
-# JSON API .Net Core
+# JSON:API .NET Core
[](https://ci.appveyor.com/project/jaredcnance/jsonapidotnetcore/branch/master)
[](https://travis-ci.org/json-api-dotnet/JsonApiDotNetCore)
@@ -21,7 +21,7 @@ These are some steps you can take to help you understand what this project is an
- [Demo [Video]](https://youtu.be/KAMuo6K7VcE)
- [Our documentation](https://json-api-dotnet.github.io/JsonApiDotNetCore/)
- [Check out the example projects](https://github.com/json-api-dotnet/JsonApiDotNetCore/tree/master/src/Examples)
-- [Embercasts: Full Stack Ember with ASP .NET Core](https://www.embercasts.com/course/full-stack-ember-with-dotnet/watch/whats-in-this-course-cs)
+- [Embercasts: Full Stack Ember with ASP.NET Core](https://www.embercasts.com/course/full-stack-ember-with-dotnet/watch/whats-in-this-course-cs)
## Related Projects
@@ -43,7 +43,7 @@ See [our documentation](https://json-api-dotnet.github.io/JsonApiDotNetCore/) fo
```csharp
public class Article : Identifiable
{
- [Attr("name")]
+ [Attr]
public string Name { get; set; }
}
```
@@ -53,12 +53,11 @@ public class Article : Identifiable
```csharp
public class ArticlesController : JsonApiController
{
- public ArticlesController(
- IJsonApiOptions options,
- IResourceService resourceService,
- ILoggerFactory loggerFactory)
- : base(options, resourceService, loggerFactory)
- { }
+ public ArticlesController(IJsonApiOptions options, IResourceService resourceService,
+ ILoggerFactory loggerFactory)
+ : base(options, resourceService, loggerFactory)
+ {
+ }
}
```
@@ -67,14 +66,16 @@ public class ArticlesController : JsonApiController
```csharp
public class Startup
{
- public IServiceProvider ConfigureServices(IServiceCollection services) {
+ public IServiceProvider ConfigureServices(IServiceCollection services)
+ {
services.AddJsonApi();
- // ...
}
- public void Configure(IApplicationBuilder app) {
- app.UseJsonApi()
- // ...
+ public void Configure(IApplicationBuilder app)
+ {
+ app.UseRouting();
+ app.UseJsonApi();
+ app.UseEndpoints(endpoints => endpoints.MapControllers());
}
}
```
@@ -101,26 +102,19 @@ And then to run the tests:
dotnet test
```
-#### Cleaning
-
-Sometimes the compiled files can be dirty / corrupt from other branches / failed builds.
-
-```bash
-dotnet clean
-```
-
#### Compiler warnings
The `Release` build configuration is set to fail on warnings. That means when submitting a PR there shouldn't be any compiler warnings because the CI build it set to `Release`.
## Compatibility
-A lot of changes were introduced in v4.0.0, the following chart should help you with compatibility issues between .NET Core versions
+A lot of changes were introduced in v4, the following chart should help you with compatibility issues between .NET Core versions.
-| .NET Core Version | JADNC Version |
-| ----------------- | ------------- |
-| 2.* | v3.* |
-| 3.* | v4.* |
+| .NET Core Version | EF Core Version | JADNC Version |
+| ----------------- | --------------- | ------------- |
+| 2.x | 2.x | v3.x |
+| 3.x | 3.x, 5.x | v4.x |
+| 5.x | 5.x | v4.x |
## Trying out the latest build
diff --git a/benchmarks/Serialization/JsonApiDeserializerBenchmarks.cs b/benchmarks/Serialization/JsonApiDeserializerBenchmarks.cs
index 6a373eb73c..3ca960ef87 100644
--- a/benchmarks/Serialization/JsonApiDeserializerBenchmarks.cs
+++ b/benchmarks/Serialization/JsonApiDeserializerBenchmarks.cs
@@ -3,6 +3,7 @@
using System.ComponentModel.Design;
using BenchmarkDotNet.Attributes;
using JsonApiDotNetCore.Configuration;
+using JsonApiDotNetCore.Middleware;
using JsonApiDotNetCore.Resources;
using JsonApiDotNetCore.Serialization;
using JsonApiDotNetCore.Serialization.Objects;
@@ -37,7 +38,8 @@ public JsonApiDeserializerBenchmarks()
var options = new JsonApiOptions();
IResourceGraph resourceGraph = DependencyFactory.CreateResourceGraph(options);
var targetedFields = new TargetedFields();
- _jsonApiDeserializer = new RequestDeserializer(resourceGraph, new ResourceFactory(new ServiceContainer()), targetedFields, new HttpContextAccessor());
+ var request = new JsonApiRequest();
+ _jsonApiDeserializer = new RequestDeserializer(resourceGraph, new ResourceFactory(new ServiceContainer()), targetedFields, new HttpContextAccessor(), request);
}
[Benchmark]
diff --git a/benchmarks/Serialization/JsonApiSerializerBenchmarks.cs b/benchmarks/Serialization/JsonApiSerializerBenchmarks.cs
index da0fa71ca1..f9f294c26b 100644
--- a/benchmarks/Serialization/JsonApiSerializerBenchmarks.cs
+++ b/benchmarks/Serialization/JsonApiSerializerBenchmarks.cs
@@ -49,7 +49,7 @@ private static FieldsToSerialize CreateFieldsToSerialize(IResourceGraph resource
var accessor = new Mock().Object;
- return new FieldsToSerialize(resourceGraph, constraintProviders, accessor);
+ return new FieldsToSerialize(resourceGraph, constraintProviders, accessor, request);
}
[Benchmark]
diff --git a/docs/getting-started/install.md b/docs/getting-started/install.md
index 6c6ef8afb1..971bf93466 100644
--- a/docs/getting-started/install.md
+++ b/docs/getting-started/install.md
@@ -16,6 +16,6 @@ Install-Package JsonApiDotnetCore
```xml
-
+
```
diff --git a/docs/internals/index.md b/docs/internals/index.md
index 7e27842923..32dde9619d 100644
--- a/docs/internals/index.md
+++ b/docs/internals/index.md
@@ -1,3 +1,3 @@
# Internals
-The section contains overviews for the inner workings of the JsonApiDotNetCore library.
+This section contains overviews for the inner workings of the JsonApiDotNetCore library.
diff --git a/docs/request-examples/index.md b/docs/request-examples/index.md
index 58cba05f1c..4d82e95854 100644
--- a/docs/request-examples/index.md
+++ b/docs/request-examples/index.md
@@ -45,22 +45,22 @@ _Note that cURL requires "[" and "]" in URLs to be escaped._
# Writing data
-### Create
+### Create resource
[!code-ps[REQUEST](010_CREATE_Person.ps1)]
[!code-json[RESPONSE](010_CREATE_Person_Response.json)]
-### Create with relationship
+### Create resource with relationship
[!code-ps[REQUEST](011_CREATE_Book-with-Author.ps1)]
[!code-json[RESPONSE](011_CREATE_Book-with-Author_Response.json)]
-### Update
+### Update resource
[!code-ps[REQUEST](012_PATCH_Book.ps1)]
[!code-json[RESPONSE](012_PATCH_Book_Response.json)]
-### Delete
+### Delete resource
[!code-ps[REQUEST](013_DELETE_Book.ps1)]
[!code-json[RESPONSE](013_DELETE_Book_Response.json)]
diff --git a/docs/usage/extensibility/repositories.md b/docs/usage/extensibility/repositories.md
index eb59c81d7c..0f953d06a4 100644
--- a/docs/usage/extensibility/repositories.md
+++ b/docs/usage/extensibility/repositories.md
@@ -3,7 +3,7 @@
If you want to use a data access technology other than Entity Framework Core, you can create an implementation of `IResourceRepository`.
If you only need minor changes you can override the methods defined in `EntityFrameworkCoreRepository`.
-The repository should then be added to the service collection in Startup.cs.
+The repository should then be registered in Startup.cs.
```c#
public void ConfigureServices(IServiceCollection services)
@@ -12,6 +12,21 @@ public void ConfigureServices(IServiceCollection services)
}
```
+In v4.0 we introduced an extension method that you can use to register a resource repository on all of its JsonApiDotNetCore interfaces.
+This is helpful when you implement a subset of the resource interfaces and want to register them all in one go.
+
+Note: If you're using service discovery, this happens automatically.
+
+```c#
+public class Startup
+{
+ public void ConfigureServices(IServiceCollection services)
+ {
+ services.AddResourceRepository();
+ }
+}
+```
+
A sample implementation that performs authorization might look like this.
All of the methods in EntityFrameworkCoreRepository will use the `GetAll()` method to get the `DbSet`, so this is a good method to apply filters such as user or tenant authorization.
diff --git a/docs/usage/extensibility/services.md b/docs/usage/extensibility/services.md
index c99911df42..2c3b612e74 100644
--- a/docs/usage/extensibility/services.md
+++ b/docs/usage/extensibility/services.md
@@ -115,7 +115,7 @@ IResourceService
PATCH /{id}/relationships/{relationship}
```
-In order to take advantage of these interfaces you first need to inject the service for each implemented interface.
+In order to take advantage of these interfaces you first need to register the service for each implemented interface.
```c#
public class ArticleService : ICreateService, IDeleteService
@@ -136,6 +136,8 @@ public class Startup
In v3.0 we introduced an extension method that you can use to register a resource service on all of its JsonApiDotNetCore interfaces.
This is helpful when you implement a subset of the resource interfaces and want to register them all in one go.
+Note: If you're using service discovery, this happens automatically.
+
```c#
public class Startup
{
diff --git a/docs/usage/filtering.md b/docs/usage/reading/filtering.md
similarity index 100%
rename from docs/usage/filtering.md
rename to docs/usage/reading/filtering.md
diff --git a/docs/usage/including-relationships.md b/docs/usage/reading/including-relationships.md
similarity index 98%
rename from docs/usage/including-relationships.md
rename to docs/usage/reading/including-relationships.md
index 2f061cd00e..dba43fcb9f 100644
--- a/docs/usage/including-relationships.md
+++ b/docs/usage/reading/including-relationships.md
@@ -47,7 +47,7 @@ GET /articles/1?include=comments HTTP/1.1
## Nested Inclusions
-_since v3.0.0_
+_since v3_
JsonApiDotNetCore also supports nested inclusions.
This allows you to include data across relationships by using a period-delimited relationship path, for example:
diff --git a/docs/usage/pagination.md b/docs/usage/reading/pagination.md
similarity index 100%
rename from docs/usage/pagination.md
rename to docs/usage/reading/pagination.md
diff --git a/docs/usage/sorting.md b/docs/usage/reading/sorting.md
similarity index 100%
rename from docs/usage/sorting.md
rename to docs/usage/reading/sorting.md
diff --git a/docs/usage/sparse-fieldset-selection.md b/docs/usage/reading/sparse-fieldset-selection.md
similarity index 100%
rename from docs/usage/sparse-fieldset-selection.md
rename to docs/usage/reading/sparse-fieldset-selection.md
diff --git a/docs/usage/resource-graph.md b/docs/usage/resource-graph.md
index 8dd32eb794..7cce11dab7 100644
--- a/docs/usage/resource-graph.md
+++ b/docs/usage/resource-graph.md
@@ -1,6 +1,6 @@
# The Resource Graph
-_NOTE: prior to 3.0.0 this was called the `ContextGraph`_
+_NOTE: prior to v4 this was called the `ContextGraph`_
The `ResourceGraph` is a map of all the json:api resources and their relationships that your API serves.
diff --git a/docs/usage/resources/relationships.md b/docs/usage/resources/relationships.md
index b501c6e984..3976e93ebb 100644
--- a/docs/usage/resources/relationships.md
+++ b/docs/usage/resources/relationships.md
@@ -20,9 +20,6 @@ public class TodoItem : Identifiable
}
```
-The convention used to locate the foreign key property (e.g. `OwnerId`) can be changed on
-the @JsonApiDotNetCore.Configuration.JsonApiOptions#JsonApiDotNetCore_Configuration_JsonApiOptions_RelatedIdMapper
-
## HasMany
```c#
diff --git a/docs/usage/resources/resource-definitions.md b/docs/usage/resources/resource-definitions.md
index d2a47453e6..7168ccb6b9 100644
--- a/docs/usage/resources/resource-definitions.md
+++ b/docs/usage/resources/resource-definitions.md
@@ -193,7 +193,7 @@ public class EmployeeDefinition : JsonApiResourceDefinition
## Custom query string parameters
-_since v3.0.0_
+_since v3_
You can define additional query string parameters with the LINQ expression that should be used.
If the key is present in a query string, the supplied LINQ expression will be added to the database query.
diff --git a/docs/usage/toc.md b/docs/usage/toc.md
index ff9476d800..0dc75882c4 100644
--- a/docs/usage/toc.md
+++ b/docs/usage/toc.md
@@ -3,13 +3,20 @@
## [Relationships](resources/relationships.md)
## [Resource Definitions](resources/resource-definitions.md)
+# Reading data
+## [Filtering](reading/filtering.md)
+## [Sorting](reading/sorting.md)
+## [Pagination](reading/pagination.md)
+## [Sparse Fieldset Selection](reading/sparse-fieldset-selection.md)
+## [Including Relationships](reading/including-relationships.md)
+
+# Writing data
+## [Creating](writing/creating.md)
+## [Updating](writing/updating.md)
+## [Deleting](writing/deleting.md)
+
# [Resource Graph](resource-graph.md)
# [Options](options.md)
-# [Filtering](filtering.md)
-# [Sorting](sorting.md)
-# [Pagination](pagination.md)
-# [Sparse Fieldset Selection](sparse-fieldset-selection.md)
-# [Including Relationships](including-relationships.md)
# [Routing](routing.md)
# [Errors](errors.md)
# [Metadata](meta.md)
diff --git a/docs/usage/writing/creating.md b/docs/usage/writing/creating.md
new file mode 100644
index 0000000000..7cda3dd61e
--- /dev/null
+++ b/docs/usage/writing/creating.md
@@ -0,0 +1,74 @@
+# Creating resources
+
+A single resource can be created by sending a POST request. The next example creates a new article:
+
+```http
+POST /articles HTTP/1.1
+
+{
+ "data": {
+ "type": "articles",
+ "attributes": {
+ "caption": "A new article!",
+ "url": "www.website.com"
+ }
+ }
+}
+```
+
+When using client-generated IDs and only attributes from the request have changed, the server returns `204 No Content`.
+Otherwise, the server returns `200 OK`, along with the updated resource and its newly assigned ID.
+
+In both cases, a `Location` header is returned that contains the URL to the new resource.
+
+# Creating resources with relationships
+
+It is possible to create a new resource and establish relationships to existing resources in a single request.
+The example below creates an article and sets both its owner and tags.
+
+```http
+POST /articles HTTP/1.1
+
+{
+ "data": {
+ "type": "articles",
+ "attributes": {
+ "caption": "A new article!"
+ },
+ "relationships": {
+ "author": {
+ "data": {
+ "type": "person",
+ "id": "101"
+ }
+ },
+ "tags": {
+ "data": [
+ {
+ "type": "tag",
+ "id": "123"
+ },
+ {
+ "type": "tag",
+ "id": "456"
+ }
+ ]
+ }
+ }
+ }
+}
+```
+
+# Response body
+
+POST requests can be combined with query string parameters that are normally used for reading data, such as `include` and `fields`. For example:
+
+```http
+POST /articles?include=owner&fields[owner]=firstName HTTP/1.1
+
+{
+ ...
+}
+```
+
+After the resource has been created on the server, it is re-fetched from the database using the specified query string parameters and returned to the client.
diff --git a/docs/usage/writing/deleting.md b/docs/usage/writing/deleting.md
new file mode 100644
index 0000000000..15c05b622a
--- /dev/null
+++ b/docs/usage/writing/deleting.md
@@ -0,0 +1,9 @@
+# Deleting resources
+
+A single resource can be deleted using a DELETE request. The next example deletes an article:
+
+```http
+DELETE /articles/1 HTTP/1.1
+```
+
+This returns `204 No Content` if the resource was successfully deleted. Alternatively, if the resource does not exist, `404 Not Found` is returned.
diff --git a/docs/usage/writing/updating.md b/docs/usage/writing/updating.md
new file mode 100644
index 0000000000..447a29550a
--- /dev/null
+++ b/docs/usage/writing/updating.md
@@ -0,0 +1,137 @@
+# Updating resources
+
+## Updating resource attributes
+
+To modify the attributes of a single resource, send a PATCH request. The next example changes the article caption:
+
+```http
+POST /articles HTTP/1.1
+
+{
+ "data": {
+ "type": "articles",
+ "id": "1",
+ "attributes": {
+ "caption": "This has changed"
+ }
+ }
+}
+```
+
+This preserves the values of all other unsent attributes and is called a *partial patch*.
+
+When only the attributes that were sent in the request have changed, the server returns `204 No Content`.
+But if additional attributes have changed (for example, by a database trigger that refreshes the last-modified date) the server returns `200 OK`, along with all attributes of the updated resource.
+
+## Updating resource relationships
+
+Besides its attributes, the relationships of a resource can be changed using a PATCH request too.
+Note that all resources being assigned in a relationship must already exist.
+
+When updating a HasMany relationship, the existing set is replaced by the new set. See below on how to add/remove resources.
+
+The next example replaces both the owner and tags of an article.
+
+```http
+PATCH /articles/1 HTTP/1.1
+
+{
+ "data": {
+ "type": "articles",
+ "id": "1",
+ "relationships": {
+ "author": {
+ "data": {
+ "type": "person",
+ "id": "101"
+ }
+ },
+ "tags": {
+ "data": [
+ {
+ "type": "tag",
+ "id": "123"
+ },
+ {
+ "type": "tag",
+ "id": "456"
+ }
+ ]
+ }
+ }
+ }
+}
+```
+
+A HasOne relationship can be cleared by setting `data` to `null`, while a HasMany relationship can be cleared by setting it to an empty array.
+
+By combining the examples above, both attributes and relationships can be updated using a single PATCH request.
+
+## Response body
+
+PATCH requests can be combined with query string parameters that are normally used for reading data, such as `include` and `fields`. For example:
+
+```http
+PATCH /articles/1?include=owner&fields[owner]=firstName HTTP/1.1
+
+{
+ ...
+}
+```
+
+After the resource has been updated on the server, it is re-fetched from the database using the specified query string parameters and returned to the client.
+Note this only has an effect when `200 OK` is returned.
+
+# Updating relationships
+
+Although relationships can be modified along with resources (as described above), it is also possible to change a single relationship using a relationship URL.
+The same rules for clearing the relationship apply. And similar to PATCH on a resource URL, updating a HasMany relationship replaces the existing set.
+
+The next example changes just the owner of an article, by sending a PATCH request to its relationship URL.
+
+```http
+PATCH /articles/1/relationships/owner HTTP/1.1
+
+{
+ "data": {
+ "type": "person",
+ "id": "101"
+ }
+}
+```
+
+The server returns `204 No Content` when the update is successful.
+
+## Changing HasMany relationships
+
+The POST and DELETE verbs can be used on HasMany relationship URLs to add or remove resources to/from an existing set without replacing it.
+
+The next example adds another tag to the existing set of tags of an article:
+
+```http
+POST /articles/1/relationships/tags HTTP/1.1
+
+{
+ "data": [
+ {
+ "type": "tag",
+ "id": "789"
+ }
+ ]
+}
+```
+
+Likewise, the next example removes a single tag from the set of tags of an article:
+
+```http
+DELETE /articles/1/relationships/tags HTTP/1.1
+
+{
+ "data": [
+ {
+ "type": "tag",
+ "id": "789"
+ }
+ ]
+}
+```
diff --git a/src/Examples/JsonApiDotNetCoreExample/Controllers/PassportsController.cs b/src/Examples/JsonApiDotNetCoreExample/Controllers/PassportsController.cs
index 152628ad96..62fa1e96c3 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Controllers/PassportsController.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Controllers/PassportsController.cs
@@ -1,50 +1,16 @@
-using System.Threading.Tasks;
using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Controllers;
using JsonApiDotNetCore.Services;
using JsonApiDotNetCoreExample.Models;
-using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
namespace JsonApiDotNetCoreExample.Controllers
{
- public sealed class PassportsController : BaseJsonApiController
+ public sealed class PassportsController : JsonApiController
{
- public PassportsController(
- IJsonApiOptions options,
- ILoggerFactory loggerFactory,
- IResourceService resourceService)
+ public PassportsController(IJsonApiOptions options, ILoggerFactory loggerFactory, IResourceService resourceService)
: base(options, loggerFactory, resourceService)
- { }
-
- [HttpGet]
- public override async Task GetAsync() => await base.GetAsync();
-
- [HttpGet("{id}")]
- public async Task GetAsync(string id)
- {
- int idValue = HexadecimalObfuscationCodec.Decode(id);
- return await base.GetAsync(idValue);
- }
-
- [HttpPatch("{id}")]
- public async Task PatchAsync(string id, [FromBody] Passport resource)
- {
- int idValue = HexadecimalObfuscationCodec.Decode(id);
- return await base.PatchAsync(idValue, resource);
- }
-
- [HttpPost]
- public override async Task PostAsync([FromBody] Passport resource)
- {
- return await base.PostAsync(resource);
- }
-
- [HttpDelete("{id}")]
- public async Task DeleteAsync(string id)
{
- int idValue = HexadecimalObfuscationCodec.Decode(id);
- return await base.DeleteAsync(idValue);
}
}
}
diff --git a/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsCustomController.cs b/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsCustomController.cs
index fb75b37226..16fd697688 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsCustomController.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsCustomController.cs
@@ -1,11 +1,9 @@
-using System.Collections.Generic;
using System.Net;
using System.Threading.Tasks;
using JsonApiDotNetCore.Configuration;
using JsonApiDotNetCore.Controllers.Annotations;
using JsonApiDotNetCore.Errors;
using JsonApiDotNetCore.Resources;
-using JsonApiDotNetCore.Serialization.Objects;
using JsonApiDotNetCore.Services;
using JsonApiDotNetCoreExample.Models;
using Microsoft.AspNetCore.Mvc;
@@ -133,9 +131,10 @@ public async Task PatchAsync(TId id, [FromBody] T resource)
}
[HttpPatch("{id}/relationships/{relationshipName}")]
- public async Task PatchRelationshipsAsync(TId id, string relationshipName, [FromBody] List relationships)
+ public async Task PatchRelationshipAsync(TId id, string relationshipName, [FromBody] object secondaryResourceIds)
{
- await _resourceService.UpdateRelationshipAsync(id, relationshipName, relationships);
+ await _resourceService.SetRelationshipAsync(id, relationshipName, secondaryResourceIds);
+
return Ok();
}
diff --git a/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsTestController.cs b/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsTestController.cs
index 2480d40f04..c6d945372e 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsTestController.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Controllers/TodoItemsTestController.cs
@@ -1,3 +1,4 @@
+using System.Collections.Generic;
using System.Net;
using System.Threading.Tasks;
using JsonApiDotNetCore.Configuration;
@@ -40,16 +41,16 @@ public TodoItemsTestController(
[HttpGet("{id}")]
public override async Task GetAsync(int id) => await base.GetAsync(id);
- [HttpGet("{id}/relationships/{relationshipName}")]
- public override async Task GetRelationshipAsync(int id, string relationshipName)
- => await base.GetRelationshipAsync(id, relationshipName);
-
[HttpGet("{id}/{relationshipName}")]
public override async Task GetSecondaryAsync(int id, string relationshipName)
=> await base.GetSecondaryAsync(id, relationshipName);
+ [HttpGet("{id}/relationships/{relationshipName}")]
+ public override async Task GetRelationshipAsync(int id, string relationshipName)
+ => await base.GetRelationshipAsync(id, relationshipName);
+
[HttpPost]
- public override async Task PostAsync(TodoItem resource)
+ public override async Task PostAsync([FromBody] TodoItem resource)
{
await Task.Yield();
@@ -59,6 +60,11 @@ public override async Task PostAsync(TodoItem resource)
});
}
+ [HttpPost("{id}/relationships/{relationshipName}")]
+ public override async Task PostRelationshipAsync(
+ int id, string relationshipName, [FromBody] ISet secondaryResourceIds)
+ => await base.PostRelationshipAsync(id, relationshipName, secondaryResourceIds);
+
[HttpPatch("{id}")]
public override async Task PatchAsync(int id, [FromBody] TodoItem resource)
{
@@ -69,8 +75,8 @@ public override async Task PatchAsync(int id, [FromBody] TodoItem
[HttpPatch("{id}/relationships/{relationshipName}")]
public override async Task PatchRelationshipAsync(
- int id, string relationshipName, [FromBody] object relationships)
- => await base.PatchRelationshipAsync(id, relationshipName, relationships);
+ int id, string relationshipName, [FromBody] object secondaryResourceIds)
+ => await base.PatchRelationshipAsync(id, relationshipName, secondaryResourceIds);
[HttpDelete("{id}")]
public override async Task DeleteAsync(int id)
@@ -79,5 +85,9 @@ public override async Task DeleteAsync(int id)
return NotFound();
}
+
+ [HttpDelete("{id}/relationships/{relationshipName}")]
+ public override async Task DeleteRelationshipAsync(int id, string relationshipName, [FromBody] ISet secondaryResourceIds)
+ => await base.DeleteRelationshipAsync(id, relationshipName, secondaryResourceIds);
}
}
diff --git a/src/Examples/JsonApiDotNetCoreExample/Data/AppDbContext.cs b/src/Examples/JsonApiDotNetCoreExample/Data/AppDbContext.cs
index 20ba2d0f88..c951e412e6 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Data/AppDbContext.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Data/AppDbContext.cs
@@ -39,24 +39,21 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
modelBuilder.Entity()
.HasOne(t => t.Assignee)
- .WithMany(p => p.AssignedTodoItems)
- .HasForeignKey(t => t.AssigneeId);
+ .WithMany(p => p.AssignedTodoItems);
modelBuilder.Entity()
.HasOne(t => t.Owner)
- .WithMany(p => p.TodoItems)
- .HasForeignKey(t => t.OwnerId);
+ .WithMany(p => p.TodoItems);
modelBuilder.Entity()
- .HasKey(bc => new { bc.ArticleId, bc.TagId });
+ .HasKey(bc => new {bc.ArticleId, bc.TagId});
modelBuilder.Entity()
- .HasKey(bc => new { bc.ArticleId, bc.TagId });
+ .HasKey(bc => new {bc.ArticleId, bc.TagId});
modelBuilder.Entity()
.HasOne(t => t.StakeHolderTodoItem)
.WithMany(t => t.StakeHolders)
- .HasForeignKey(t => t.StakeHolderTodoItemId)
.OnDelete(DeleteBehavior.Cascade);
modelBuilder.Entity()
@@ -64,13 +61,12 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
modelBuilder.Entity()
.HasMany(t => t.ChildrenTodos)
- .WithOne(t => t.ParentTodo)
- .HasForeignKey(t => t.ParentTodoId);
+ .WithOne(t => t.ParentTodo);
modelBuilder.Entity()
.HasOne(p => p.Person)
.WithOne(p => p.Passport)
- .HasForeignKey(p => p.PassportId)
+ .HasForeignKey("PassportKey")
.OnDelete(DeleteBehavior.SetNull);
modelBuilder.Entity()
@@ -81,7 +77,7 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
modelBuilder.Entity()
.HasOne(p => p.OneToOnePerson)
.WithOne(p => p.OneToOneTodoItem)
- .HasForeignKey(p => p.OneToOnePersonId);
+ .HasForeignKey("OneToOnePersonKey");
modelBuilder.Entity()
.HasOne(p => p.Owner)
@@ -89,9 +85,9 @@ protected override void OnModelCreating(ModelBuilder modelBuilder)
.OnDelete(DeleteBehavior.Cascade);
modelBuilder.Entity()
- .HasOne(p => p.OneToOneTodoItem)
- .WithOne(p => p.OneToOnePerson)
- .HasForeignKey(p => p.OneToOnePersonId);
+ .HasOne(p => p.Role)
+ .WithOne(p => p.Person)
+ .HasForeignKey("PersonRoleKey");
}
}
}
diff --git a/src/Examples/JsonApiDotNetCoreExample/Models/ArticleTag.cs b/src/Examples/JsonApiDotNetCoreExample/Models/ArticleTag.cs
index 317ecf5e65..b0e4d59435 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Models/ArticleTag.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Models/ArticleTag.cs
@@ -1,6 +1,3 @@
-using JsonApiDotNetCore.Resources;
-using JsonApiDotNetCore.Resources.Annotations;
-
namespace JsonApiDotNetCoreExample.Models
{
public sealed class ArticleTag
@@ -11,17 +8,4 @@ public sealed class ArticleTag
public int TagId { get; set; }
public Tag Tag { get; set; }
}
-
- public class IdentifiableArticleTag : Identifiable
- {
- public int ArticleId { get; set; }
- [HasOne]
- public Article Article { get; set; }
-
- public int TagId { get; set; }
- [HasOne]
- public Tag Tag { get; set; }
-
- public string SomeMetaData { get; set; }
- }
}
diff --git a/src/Examples/JsonApiDotNetCoreExample/Models/IdentifiableArticleTag.cs b/src/Examples/JsonApiDotNetCoreExample/Models/IdentifiableArticleTag.cs
new file mode 100644
index 0000000000..3183540aba
--- /dev/null
+++ b/src/Examples/JsonApiDotNetCoreExample/Models/IdentifiableArticleTag.cs
@@ -0,0 +1,18 @@
+using JsonApiDotNetCore.Resources;
+using JsonApiDotNetCore.Resources.Annotations;
+
+namespace JsonApiDotNetCoreExample.Models
+{
+ public class IdentifiableArticleTag : Identifiable
+ {
+ public int ArticleId { get; set; }
+ [HasOne]
+ public Article Article { get; set; }
+
+ public int TagId { get; set; }
+ [HasOne]
+ public Tag Tag { get; set; }
+
+ public string SomeMetaData { get; set; }
+ }
+}
diff --git a/src/Examples/JsonApiDotNetCoreExample/Models/NonJsonApiResource.cs b/src/Examples/JsonApiDotNetCoreExample/Models/NonJsonApiResource.cs
deleted file mode 100644
index 7f979f4cfb..0000000000
--- a/src/Examples/JsonApiDotNetCoreExample/Models/NonJsonApiResource.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace JsonApiDotNetCoreExample.Models
-{
- public class NonJsonApiResource
- {
- public int Id { get; set; }
- }
-}
diff --git a/src/Examples/JsonApiDotNetCoreExample/Models/Passport.cs b/src/Examples/JsonApiDotNetCoreExample/Models/Passport.cs
index 483ecceeda..58eaeb5f9f 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Models/Passport.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Models/Passport.cs
@@ -14,16 +14,6 @@ public class Passport : Identifiable
private readonly ISystemClock _systemClock;
private int? _socialSecurityNumber;
- protected override string GetStringId(int value)
- {
- return HexadecimalObfuscationCodec.Encode(value);
- }
-
- protected override int GetTypedId(string value)
- {
- return HexadecimalObfuscationCodec.Decode(value);
- }
-
[Attr]
public int? SocialSecurityNumber
{
@@ -51,7 +41,7 @@ public int? SocialSecurityNumber
[NotMapped]
public string BirthCountryName
{
- get => BirthCountry.Name;
+ get => BirthCountry?.Name;
set
{
BirthCountry ??= new Country();
diff --git a/src/Examples/JsonApiDotNetCoreExample/Models/Person.cs b/src/Examples/JsonApiDotNetCoreExample/Models/Person.cs
index db610ac0f2..b5d67fb5a0 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Models/Person.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Models/Person.cs
@@ -57,20 +57,17 @@ public string FirstName
[HasOne]
public PersonRole Role { get; set; }
- public int? PersonRoleId { get; set; }
[HasOne]
public TodoItem OneToOneTodoItem { get; set; }
[HasOne]
public TodoItem StakeHolderTodoItem { get; set; }
- public int? StakeHolderTodoItemId { get; set; }
[HasOne(Links = LinkTypes.All, CanInclude = false)]
public TodoItem UnIncludeableItem { get; set; }
[HasOne]
public Passport Passport { get; set; }
- public int? PassportId { get; set; }
}
}
diff --git a/src/Examples/JsonApiDotNetCoreExample/Models/Tag.cs b/src/Examples/JsonApiDotNetCoreExample/Models/Tag.cs
index dbee65a188..ace6f23711 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Models/Tag.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Models/Tag.cs
@@ -18,11 +18,4 @@ public class Tag : Identifiable
public ISet Articles { get; set; }
public ISet ArticleTags { get; set; }
}
-
- public enum TagColor
- {
- Red,
- Green,
- Blue
- }
}
diff --git a/src/Examples/JsonApiDotNetCoreExample/Models/TagColor.cs b/src/Examples/JsonApiDotNetCoreExample/Models/TagColor.cs
new file mode 100644
index 0000000000..8ae4552afe
--- /dev/null
+++ b/src/Examples/JsonApiDotNetCoreExample/Models/TagColor.cs
@@ -0,0 +1,9 @@
+namespace JsonApiDotNetCoreExample.Models
+{
+ public enum TagColor
+ {
+ Red,
+ Green,
+ Blue
+ }
+}
diff --git a/src/Examples/JsonApiDotNetCoreExample/Models/TodoItem.cs b/src/Examples/JsonApiDotNetCoreExample/Models/TodoItem.cs
index 782b2521be..64afada036 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Models/TodoItem.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Models/TodoItem.cs
@@ -7,11 +7,6 @@ namespace JsonApiDotNetCoreExample.Models
{
public class TodoItem : Identifiable, IIsLockable
{
- public TodoItem()
- {
- GuidProperty = Guid.NewGuid();
- }
-
public bool IsLocked { get; set; }
[Attr]
@@ -20,9 +15,6 @@ public TodoItem()
[Attr]
public long Ordinal { get; set; }
- [Attr]
- public Guid GuidProperty { get; set; }
-
[Attr(Capabilities = AttrCapabilities.All & ~AttrCapabilities.AllowCreate)]
public string AlwaysChangingValue
{
@@ -36,21 +28,12 @@ public string AlwaysChangingValue
[Attr(Capabilities = AttrCapabilities.All & ~(AttrCapabilities.AllowFilter | AttrCapabilities.AllowSort))]
public DateTime? AchievedDate { get; set; }
- [Attr]
- public DateTime? UpdatedDate { get; set; }
-
[Attr(Capabilities = AttrCapabilities.All & ~(AttrCapabilities.AllowCreate | AttrCapabilities.AllowChange))]
public string CalculatedValue => "calculated";
[Attr(Capabilities = AttrCapabilities.All & ~AttrCapabilities.AllowChange)]
public DateTimeOffset? OffsetDate { get; set; }
- public int? OwnerId { get; set; }
-
- public int? AssigneeId { get; set; }
-
- public Guid? CollectionId { get; set; }
-
[HasOne]
public Person Owner { get; set; }
@@ -60,8 +43,6 @@ public string AlwaysChangingValue
[HasOne]
public Person OneToOnePerson { get; set; }
- public int? OneToOnePersonId { get; set; }
-
[HasMany]
public ISet StakeHolders { get; set; }
@@ -69,14 +50,10 @@ public string AlwaysChangingValue
public TodoItemCollection Collection { get; set; }
// cyclical to-one structure
- public int? DependentOnTodoId { get; set; }
-
[HasOne]
public TodoItem DependentOnTodo { get; set; }
// cyclical to-many structure
- public int? ParentTodoId {get; set;}
-
[HasOne]
public TodoItem ParentTodo { get; set; }
diff --git a/src/Examples/JsonApiDotNetCoreExample/Models/TodoItemCollection.cs b/src/Examples/JsonApiDotNetCoreExample/Models/TodoItemCollection.cs
index 9b0a515f25..4f3c88e152 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Models/TodoItemCollection.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Models/TodoItemCollection.cs
@@ -16,7 +16,5 @@ public sealed class TodoItemCollection : Identifiable
[HasOne]
public Person Owner { get; set; }
-
- public int? OwnerId { get; set; }
}
}
diff --git a/src/Examples/JsonApiDotNetCoreExample/Services/CustomArticleService.cs b/src/Examples/JsonApiDotNetCoreExample/Services/CustomArticleService.cs
index 430b65e27e..2e42b0a413 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Services/CustomArticleService.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Services/CustomArticleService.cs
@@ -14,7 +14,7 @@ namespace JsonApiDotNetCoreExample.Services
public class CustomArticleService : JsonApiResourceService
{
public CustomArticleService(
- IResourceRepository repository,
+ IResourceRepositoryAccessor repositoryAccessor,
IQueryLayerComposer queryLayerComposer,
IPaginationContext paginationContext,
IJsonApiOptions options,
@@ -22,8 +22,8 @@ public CustomArticleService(
IJsonApiRequest request,
IResourceChangeTracker resourceChangeTracker,
IResourceFactory resourceFactory,
- IResourceHookExecutor hookExecutor = null)
- : base(repository, queryLayerComposer, paginationContext, options, loggerFactory, request,
+ IResourceHookExecutorFacade hookExecutor)
+ : base(repositoryAccessor, queryLayerComposer, paginationContext, options, loggerFactory, request,
resourceChangeTracker, resourceFactory, hookExecutor)
{ }
diff --git a/src/Examples/JsonApiDotNetCoreExample/Startups/Startup.cs b/src/Examples/JsonApiDotNetCoreExample/Startups/Startup.cs
index 85116981ba..628e566a58 100644
--- a/src/Examples/JsonApiDotNetCoreExample/Startups/Startup.cs
+++ b/src/Examples/JsonApiDotNetCoreExample/Startups/Startup.cs
@@ -35,7 +35,9 @@ public override void ConfigureServices(IServiceCollection services)
{
options.EnableSensitiveDataLogging();
options.UseNpgsql(_connectionString, innerOptions => innerOptions.SetPostgresVersion(new Version(9, 6)));
- }, ServiceLifetime.Transient);
+ },
+ // TODO: Remove ServiceLifetime.Transient, after all integration tests have been converted to use IntegrationTestContext.
+ ServiceLifetime.Transient);
services.AddJsonApi(ConfigureJsonApiOptions, discovery => discovery.AddCurrentAssembly());
diff --git a/src/Examples/MultiDbContextExample/Repositories/DbContextARepository.cs b/src/Examples/MultiDbContextExample/Repositories/DbContextARepository.cs
index 751c02703a..574695700b 100644
--- a/src/Examples/MultiDbContextExample/Repositories/DbContextARepository.cs
+++ b/src/Examples/MultiDbContextExample/Repositories/DbContextARepository.cs
@@ -12,11 +12,9 @@ public class DbContextARepository : EntityFrameworkCoreRepository
{
public DbContextARepository(ITargetedFields targetedFields, DbContextResolver contextResolver,
- IResourceGraph resourceGraph, IGenericServiceFactory genericServiceFactory,
- IResourceFactory resourceFactory, IEnumerable constraintProviders,
- ILoggerFactory loggerFactory)
- : base(targetedFields, contextResolver, resourceGraph, genericServiceFactory, resourceFactory,
- constraintProviders, loggerFactory)
+ IResourceGraph resourceGraph, IResourceFactory resourceFactory,
+ IEnumerable constraintProviders, ILoggerFactory loggerFactory)
+ : base(targetedFields, contextResolver, resourceGraph, resourceFactory, constraintProviders, loggerFactory)
{
}
}
diff --git a/src/Examples/MultiDbContextExample/Repositories/DbContextBRepository.cs b/src/Examples/MultiDbContextExample/Repositories/DbContextBRepository.cs
index c0761187b1..098a580579 100644
--- a/src/Examples/MultiDbContextExample/Repositories/DbContextBRepository.cs
+++ b/src/Examples/MultiDbContextExample/Repositories/DbContextBRepository.cs
@@ -12,11 +12,9 @@ public class DbContextBRepository : EntityFrameworkCoreRepository
{
public DbContextBRepository(ITargetedFields targetedFields, DbContextResolver contextResolver,
- IResourceGraph resourceGraph, IGenericServiceFactory genericServiceFactory,
- IResourceFactory resourceFactory, IEnumerable constraintProviders,
- ILoggerFactory loggerFactory)
- : base(targetedFields, contextResolver, resourceGraph, genericServiceFactory, resourceFactory,
- constraintProviders, loggerFactory)
+ IResourceGraph resourceGraph, IResourceFactory resourceFactory,
+ IEnumerable constraintProviders, ILoggerFactory loggerFactory)
+ : base(targetedFields, contextResolver, resourceGraph, resourceFactory, constraintProviders, loggerFactory)
{
}
}
diff --git a/src/Examples/MultiDbContextExample/Startup.cs b/src/Examples/MultiDbContextExample/Startup.cs
index 35f274cf5f..09e120cd01 100644
--- a/src/Examples/MultiDbContextExample/Startup.cs
+++ b/src/Examples/MultiDbContextExample/Startup.cs
@@ -1,5 +1,4 @@
using JsonApiDotNetCore.Configuration;
-using JsonApiDotNetCore.Repositories;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.EntityFrameworkCore;
@@ -19,10 +18,13 @@ public void ConfigureServices(IServiceCollection services)
services.AddDbContext(options => options.UseSqlite("Data Source=A.db"));
services.AddDbContext(options => options.UseSqlite("Data Source=B.db"));
- services.AddScoped, DbContextARepository>();
- services.AddScoped, DbContextBRepository>();
+ services.AddResourceRepository>();
+ services.AddResourceRepository>();
- services.AddJsonApi(dbContextTypes: new[] {typeof(DbContextA), typeof(DbContextB)});
+ services.AddJsonApi(options =>
+ {
+ options.IncludeExceptionStackTraceInErrors = true;
+ }, dbContextTypes: new[] {typeof(DbContextA), typeof(DbContextB)});
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
diff --git a/src/Examples/NoEntityFrameworkExample/Services/WorkItemService.cs b/src/Examples/NoEntityFrameworkExample/Services/WorkItemService.cs
index 8eeae612c7..a5c34e0966 100644
--- a/src/Examples/NoEntityFrameworkExample/Services/WorkItemService.cs
+++ b/src/Examples/NoEntityFrameworkExample/Services/WorkItemService.cs
@@ -4,6 +4,7 @@
using System.Linq;
using System.Threading.Tasks;
using Dapper;
+using JsonApiDotNetCore.Resources;
using JsonApiDotNetCore.Services;
using Microsoft.Extensions.Configuration;
using NoEntityFrameworkExample.Models;
@@ -30,7 +31,7 @@ public async Task> GetAsync()
public async Task GetAsync(int id)
{
var query = await QueryAsync(async connection =>
- await connection.QueryAsync(@"select * from ""WorkItems"" where ""Id""=@id", new { id }));
+ await connection.QueryAsync(@"select * from ""WorkItems"" where ""Id""=@id", new {id}));
return query.Single();
}
@@ -40,7 +41,7 @@ public Task