Use separate EfGenerator project

This commit is contained in:
CodeLiturgy 2022-09-05 23:17:47 +01:00
parent e08a11e9ce
commit 1cea9867f4
7 changed files with 40 additions and 25 deletions

3
.gitmodules vendored
View File

@ -7,3 +7,6 @@
[submodule "BlueWest.Frontend"] [submodule "BlueWest.Frontend"]
path = BlueWest.Frontend path = BlueWest.Frontend
url = git@git.codeliturgy.com:P0/BlueWest.Frontend.git url = git@git.codeliturgy.com:P0/BlueWest.Frontend.git
[submodule "include/BlueWest.EfGenerator"]
path = include/BlueWest.EfGenerator
url = git@git.codeliturgy.com:P0/BlueWest.EfGenerator.git

View File

@ -23,9 +23,9 @@
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" /> <PackageReference Include="Swashbuckle.AspNetCore" Version="6.4.0" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<AdditionalFiles Include=".\Context\Templates\AddToEntityTemplate.csx" /> <AdditionalFiles Include="Context\Templates\AddToEntityTemplate.csx" />
<AdditionalFiles Include=".\Context\Templates\UpdateEntityTemplate.csx" /> <AdditionalFiles Include="Context\Templates\UpdateEntityTemplate.csx" />
<AdditionalFiles Include=".\Context\Templates\GetOneByTemplate.csx" /> <AdditionalFiles Include="Context\Templates\GetOneByTemplate.csx" />
<AdditionalFiles Include="Context\Templates\GetManyTemplate.csx" /> <AdditionalFiles Include="Context\Templates\GetManyTemplate.csx" />
<AdditionalFiles Include="Context\Templates\GetOneTemplate.csx" /> <AdditionalFiles Include="Context\Templates\GetOneTemplate.csx" />
@ -34,9 +34,11 @@
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\BlueWest.Data.Capital\BlueWest.Data.Capital.csproj" /> <ProjectReference Include="..\BlueWest.Data.Capital\BlueWest.Data.Capital.csproj" />
<ProjectReference Include="..\BlueWest\BlueWest.csproj" /> <ProjectReference Include="..\BlueWest\BlueWest.csproj" />
<ProjectReference Include="..\include\BlueWest.MapTo\src\BlueWest.MapTo\BlueWest.MapTo.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" /> <ProjectReference Include="..\include\BlueWest.EfMethods\src\BlueWest.EfMethods\BlueWest.EfMethods.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup> </ItemGroup>
<Import Project="..\include\BlueWest.MapTo\src\BlueWest.MapTo\MapTo.props" /> <Import Project="..\include\BlueWest.EfMethods\src\BlueWest.EfMethods\BlueWest.EfMethods.props" />
</Project> </Project>

View File

@ -1,7 +1,7 @@
using BlueWest.Data; using BlueWest.Data;
using BlueWest.WebApi.EF.Model; using BlueWest.WebApi.EF.Model;
using MapTo; using BlueWest.EfMethods;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
namespace BlueWest.WebApi.EF namespace BlueWest.WebApi.EF

View File

@ -1,6 +1,6 @@
using BlueWest.Data; using BlueWest.Data;
using BlueWest.WebApi.EF.Model; using BlueWest.WebApi.EF.Model;
using MapTo; using BlueWest.EfMethods;
using Microsoft.EntityFrameworkCore; using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
@ -19,7 +19,9 @@ namespace BlueWest.WebApi.EF
/// Countries Database Table /// Countries Database Table
/// </summary> /// </summary>
[EfGetOneBy(nameof(Country.Id),typeof(CountryUnique))] [EfGetOneBy(
nameof(Country.Id),
typeof(CountryUnique))]
[EfGetOne(typeof(CountryUnique))] [EfGetOne(typeof(CountryUnique))]

View File

@ -1,7 +1,7 @@
 
Microsoft Visual Studio Solution File, Format Version 12.00 Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16 # Visual Studio Version 17
VisualStudioVersion = 16.0.31911.196 VisualStudioVersion = 17.3.32819.101
MinimumVisualStudioVersion = 10.0.40219.1 MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlueWest", "BlueWest\BlueWest.csproj", "{293E7852-8AFD-4EFB-8C2D-F1BBE68AEE78}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlueWest", "BlueWest\BlueWest.csproj", "{293E7852-8AFD-4EFB-8C2D-F1BBE68AEE78}"
EndProject EndProject
@ -9,15 +9,15 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlueWest.Data.Capital", "Bl
EndProject EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlueWest.Api", "BlueWest.Api\BlueWest.Api.csproj", "{6D3321B5-CF1A-4251-B28D-329EDA6DC278}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlueWest.Api", "BlueWest.Api\BlueWest.Api.csproj", "{6D3321B5-CF1A-4251-B28D-329EDA6DC278}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlueWest.MapTo", "include\BlueWest.MapTo\src\BlueWest.MapTo\BlueWest.MapTo.csproj", "{72B37540-A12F-466E-A58F-7BA2B247CB74}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlueWest.MapTo", "include\BlueWest.MapTo\src\BlueWest.MapTo\BlueWest.MapTo.csproj", "{72B37540-A12F-466E-A58F-7BA2B247CB74}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleExpressionEvaluator", "include\Math-Expression-Evaluator\SimpleExpressionEvaluator\SimpleExpressionEvaluator.csproj", "{30637214-EDE9-4C2E-BFD6-E4B163FA308B}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleExpressionEvaluator", "include\Math-Expression-Evaluator\SimpleExpressionEvaluator\SimpleExpressionEvaluator.csproj", "{30637214-EDE9-4C2E-BFD6-E4B163FA308B}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "include", "include", "{A1606EEC-6AC5-4779-B140-F57089F5A05F}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "include", "include", "{A1606EEC-6AC5-4779-B140-F57089F5A05F}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SimpleExpressionEvaluator.Tests", "include\Math-Expression-Evaluator\SimpleExpressionEvaluator.Tests\SimpleExpressionEvaluator.Tests.csproj", "{08F4484E-5FD8-4590-A8D7-12FBE47120C8}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SimpleExpressionEvaluator.Tests", "include\Math-Expression-Evaluator\SimpleExpressionEvaluator.Tests\SimpleExpressionEvaluator.Tests.csproj", "{08F4484E-5FD8-4590-A8D7-12FBE47120C8}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlueWest.MapTo.Tests", "include\BlueWest.MapTo\test\BlueWest.MapTo.Tests\BlueWest.MapTo.Tests.csproj", "{5BE0A68C-B3ED-4FA1-B74B-3E857504899B}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlueWest.MapTo.Tests", "include\BlueWest.MapTo\test\BlueWest.MapTo.Tests\BlueWest.MapTo.Tests.csproj", "{5BE0A68C-B3ED-4FA1-B74B-3E857504899B}"
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docker", "docker", "{D7BF4ADC-44AA-48B1-8406-8587775A0DC6}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docker", "docker", "{D7BF4ADC-44AA-48B1-8406-8587775A0DC6}"
ProjectSection(SolutionItems) = preProject ProjectSection(SolutionItems) = preProject
@ -32,9 +32,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "README", "README", "{E9E3CE
EndProject EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{552B9217-4BB2-432A-B1B5-45E9B1AB13BC}" Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{552B9217-4BB2-432A-B1B5-45E9B1AB13BC}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlueWest.Api.Gateway", "BlueWest.Api.Gateway\BlueWest.Api.Gateway.csproj", "{A78343AF-77C6-48FD-A9C4-F8B7CBA56212}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlueWest.Api.Gateway", "BlueWest.Api.Gateway\BlueWest.Api.Gateway.csproj", "{A78343AF-77C6-48FD-A9C4-F8B7CBA56212}"
EndProject EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BlueWest.Data.Geography", "BlueWest.Data.Geography\BlueWest.Data.Geography.csproj", "{D5924A3F-0AA1-4AF4-AEDB-3B9F91E6531E}" Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlueWest.Data.Geography", "BlueWest.Data.Geography\BlueWest.Data.Geography.csproj", "{D5924A3F-0AA1-4AF4-AEDB-3B9F91E6531E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlueWest.EfMethods", "include\BlueWest.EfMethods\src\BlueWest.EfMethods\BlueWest.EfMethods.csproj", "{BBF5E860-A880-450B-B6C9-EF92F6421B3D}"
EndProject EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -78,19 +80,24 @@ Global
{D5924A3F-0AA1-4AF4-AEDB-3B9F91E6531E}.Debug|Any CPU.Build.0 = Debug|Any CPU {D5924A3F-0AA1-4AF4-AEDB-3B9F91E6531E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D5924A3F-0AA1-4AF4-AEDB-3B9F91E6531E}.Release|Any CPU.ActiveCfg = Release|Any CPU {D5924A3F-0AA1-4AF4-AEDB-3B9F91E6531E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D5924A3F-0AA1-4AF4-AEDB-3B9F91E6531E}.Release|Any CPU.Build.0 = Release|Any CPU {D5924A3F-0AA1-4AF4-AEDB-3B9F91E6531E}.Release|Any CPU.Build.0 = Release|Any CPU
{BBF5E860-A880-450B-B6C9-EF92F6421B3D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BBF5E860-A880-450B-B6C9-EF92F6421B3D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BBF5E860-A880-450B-B6C9-EF92F6421B3D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BBF5E860-A880-450B-B6C9-EF92F6421B3D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
EndGlobalSection EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{293E7852-8AFD-4EFB-8C2D-F1BBE68AEE78} = {552B9217-4BB2-432A-B1B5-45E9B1AB13BC}
{72B37540-A12F-466E-A58F-7BA2B247CB74} = {A1606EEC-6AC5-4779-B140-F57089F5A05F}
{30637214-EDE9-4C2E-BFD6-E4B163FA308B} = {A1606EEC-6AC5-4779-B140-F57089F5A05F}
{08F4484E-5FD8-4590-A8D7-12FBE47120C8} = {A1606EEC-6AC5-4779-B140-F57089F5A05F}
{5BE0A68C-B3ED-4FA1-B74B-3E857504899B} = {A1606EEC-6AC5-4779-B140-F57089F5A05F}
{A78343AF-77C6-48FD-A9C4-F8B7CBA56212} = {552B9217-4BB2-432A-B1B5-45E9B1AB13BC}
{BBF5E860-A880-450B-B6C9-EF92F6421B3D} = {A1606EEC-6AC5-4779-B140-F57089F5A05F}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F24E44CA-98BA-4B44-A1E1-57912CC5DCC3} SolutionGuid = {F24E44CA-98BA-4B44-A1E1-57912CC5DCC3}
EndGlobalSection EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{30637214-EDE9-4C2E-BFD6-E4B163FA308B} = {A1606EEC-6AC5-4779-B140-F57089F5A05F}
{72B37540-A12F-466E-A58F-7BA2B247CB74} = {A1606EEC-6AC5-4779-B140-F57089F5A05F}
{08F4484E-5FD8-4590-A8D7-12FBE47120C8} = {A1606EEC-6AC5-4779-B140-F57089F5A05F}
{5BE0A68C-B3ED-4FA1-B74B-3E857504899B} = {A1606EEC-6AC5-4779-B140-F57089F5A05F}
{293E7852-8AFD-4EFB-8C2D-F1BBE68AEE78} = {552B9217-4BB2-432A-B1B5-45E9B1AB13BC}
{A78343AF-77C6-48FD-A9C4-F8B7CBA56212} = {552B9217-4BB2-432A-B1B5-45E9B1AB13BC}
EndGlobalSection
EndGlobal EndGlobal

@ -0,0 +1 @@
Subproject commit 33fbb36fb85cabaa8995ac8e16e5ed6fdd733805

@ -1 +1 @@
Subproject commit 32bf670b9e09a8d5c2f130be30b473f9e26cd61f Subproject commit b8637c94abecb93168a6b94f59044c9e32ab66a5