Browse Source

Added product management module

pull/746/head
Halil ibrahim Kalkan 8 years ago
parent
commit
d7023c5867
  1. 105
      samples/MicroserviceDemo/MicroserviceDemo.sln
  2. 37
      samples/MicroserviceDemo/microservices/product/ProductService.Host/ProductService.Host.csproj
  3. 24
      samples/MicroserviceDemo/microservices/product/ProductService.Host/Program.cs
  4. 27
      samples/MicroserviceDemo/microservices/product/ProductService.Host/Properties/launchSettings.json
  5. 34
      samples/MicroserviceDemo/microservices/product/ProductService.Host/Startup.cs
  6. 9
      samples/MicroserviceDemo/microservices/product/ProductService.Host/appsettings.Development.json
  7. 11
      samples/MicroserviceDemo/microservices/product/ProductService.Host/appsettings.json
  8. 6
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/MyCompanyName/ProductManagement/Localization/ApplicationContracts/en.json
  9. 6
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/MyCompanyName/ProductManagement/Localization/ApplicationContracts/pt-BR.json
  10. 6
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/MyCompanyName/ProductManagement/Localization/ApplicationContracts/zh-Hans.json
  11. 37
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/MyCompanyName/ProductManagement/ProductManagementApplicationContractsModule.cs
  12. 19
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/MyCompanyName/ProductManagement/ProductManagementPermissionDefinitionProvider.cs
  13. 15
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/MyCompanyName/ProductManagement/ProductManagementPermissions.cs
  14. 21
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/ProductManagement.Application.Contracts.csproj
  15. 12
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Application/MyCompanyName/ProductManagement/ProductManagementApplicationAutoMapperProfile.cs
  16. 28
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Application/MyCompanyName/ProductManagement/ProductManagementApplicationModule.cs
  17. 14
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Application/MyCompanyName/ProductManagement/ProductManagementSettingDefinitionProvider.cs
  18. 11
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Application/MyCompanyName/ProductManagement/ProductManagementSettings.cs
  19. 14
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Application/ProductManagement.Application.csproj
  20. 12
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain.Shared/ProductManagement.Domain.Shared.csproj
  21. 10
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain.Shared/ProductManagement/Localization/ProductManagementResource.cs
  22. 7
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain.Shared/ProductManagement/ProductManagementDomainErrorCodes.cs
  23. 21
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain.Shared/ProductManagement/ProductManagementDomainSharedModule.cs
  24. 6
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain/MyCompanyName/ProductManagement/Localization/Domain/en.json
  25. 6
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain/MyCompanyName/ProductManagement/Localization/Domain/pt-BR.json
  26. 6
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain/MyCompanyName/ProductManagement/Localization/Domain/zh-Hans.json
  27. 9
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain/MyCompanyName/ProductManagement/ProductManagementConsts.cs
  28. 33
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain/MyCompanyName/ProductManagement/ProductManagementDomainModule.cs
  29. 21
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain/ProductManagement.Domain.csproj
  30. 13
      samples/MicroserviceDemo/modules/product/src/ProductManagement.EntityFrameworkCore/MyCompanyName/ProductManagement/EntityFrameworkCore/IProductManagementDbContext.cs
  31. 35
      samples/MicroserviceDemo/modules/product/src/ProductManagement.EntityFrameworkCore/MyCompanyName/ProductManagement/EntityFrameworkCore/ProductManagementDbContext.cs
  32. 38
      samples/MicroserviceDemo/modules/product/src/ProductManagement.EntityFrameworkCore/MyCompanyName/ProductManagement/EntityFrameworkCore/ProductManagementDbContextModelCreatingExtensions.cs
  33. 23
      samples/MicroserviceDemo/modules/product/src/ProductManagement.EntityFrameworkCore/MyCompanyName/ProductManagement/EntityFrameworkCore/ProductManagementEntityFrameworkCoreModule.cs
  34. 18
      samples/MicroserviceDemo/modules/product/src/ProductManagement.EntityFrameworkCore/MyCompanyName/ProductManagement/EntityFrameworkCore/ProductManagementModelBuilderConfigurationOptions.cs
  35. 13
      samples/MicroserviceDemo/modules/product/src/ProductManagement.EntityFrameworkCore/ProductManagement.EntityFrameworkCore.csproj
  36. 22
      samples/MicroserviceDemo/modules/product/src/ProductManagement.HttpApi.Client/MyCompanyName/ProductManagement/ProductManagementHttpApiClientModule.cs
  37. 13
      samples/MicroserviceDemo/modules/product/src/ProductManagement.HttpApi.Client/ProductManagement.HttpApi.Client.csproj
  38. 13
      samples/MicroserviceDemo/modules/product/src/ProductManagement.HttpApi/MyCompanyName/ProductManagement/ProductManagementHttpApiModule.cs
  39. 13
      samples/MicroserviceDemo/modules/product/src/ProductManagement.HttpApi/ProductManagement.HttpApi.csproj
  40. 6
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/Localization/Resources/ProductManagement/en.json
  41. 6
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/Localization/Resources/ProductManagement/pt-BR.json
  42. 6
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/Localization/Resources/ProductManagement/zh-Hans.json
  43. 4
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/Pages/ProductManagement/_ViewImports.cshtml
  44. 35
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/ProductManagement.Web.csproj
  45. 23
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/ProductManagementMenuContributor.cs
  46. 12
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/ProductManagementWebAutoMapperProfile.cs
  47. 62
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/ProductManagementWebModule.cs
  48. 27
      samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/Properties/launchSettings.json
  49. 13
      samples/MicroserviceDemo/modules/product/test/ProductManagement.Application.Tests/MyCompanyName/ProductManagement/ProductManagementApplicationTestModule.cs
  50. 17
      samples/MicroserviceDemo/modules/product/test/ProductManagement.Application.Tests/ProductManagement.Application.Tests.csproj
  51. 7
      samples/MicroserviceDemo/modules/product/test/ProductManagement.Domain.Tests/MyCompanyName/ProductManagement/ProductManagementDomainTestBase.cs
  52. 13
      samples/MicroserviceDemo/modules/product/test/ProductManagement.Domain.Tests/MyCompanyName/ProductManagement/ProductManagementDomainTestModule.cs
  53. 16
      samples/MicroserviceDemo/modules/product/test/ProductManagement.Domain.Tests/ProductManagement.Domain.Tests.csproj
  54. 7
      samples/MicroserviceDemo/modules/product/test/ProductManagement.EntityFrameworkCore.Tests/MyCompanyName/ProductManagement/EntityFrameworkCore/MyEntityRepository_Tests.cs
  55. 42
      samples/MicroserviceDemo/modules/product/test/ProductManagement.EntityFrameworkCore.Tests/MyCompanyName/ProductManagement/EntityFrameworkCore/ProductManagementEntityFrameworkCoreTestModule.cs
  56. 20
      samples/MicroserviceDemo/modules/product/test/ProductManagement.EntityFrameworkCore.Tests/ProductManagement.EntityFrameworkCore.Tests.csproj
  57. 16
      samples/MicroserviceDemo/modules/product/test/ProductManagement.TestBase/MyCompanyName/ProductManagement/MyEntityRepository_Tests.cs
  58. 14
      samples/MicroserviceDemo/modules/product/test/ProductManagement.TestBase/MyCompanyName/ProductManagement/ProductManagementTestBase.cs
  59. 37
      samples/MicroserviceDemo/modules/product/test/ProductManagement.TestBase/MyCompanyName/ProductManagement/ProductManagementTestBaseModule.cs
  60. 8
      samples/MicroserviceDemo/modules/product/test/ProductManagement.TestBase/MyCompanyName/ProductManagement/ProductManagementTestData.cs
  61. 24
      samples/MicroserviceDemo/modules/product/test/ProductManagement.TestBase/MyCompanyName/ProductManagement/ProductManagementTestDataBuilder.cs
  62. 24
      samples/MicroserviceDemo/modules/product/test/ProductManagement.TestBase/ProductManagement.TestBase.csproj

105
samples/MicroserviceDemo/MicroserviceDemo.sln

@ -19,6 +19,42 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "consoleclient", "consolecli
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConsoleClientDemo", "applications\consoleclient\ConsoleClientDemo\ConsoleClientDemo.csproj", "{06383443-5840-4C95-A038-A4B9E9211202}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "product", "product", "{DB29DE67-61C2-4B21-BAE3-A9C5A5F04822}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ProductService.Host", "microservices\product\ProductService.Host\ProductService.Host.csproj", "{8A3F1AEE-5B54-48AD-8EC7-C2D9339E107C}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "modules", "modules", "{818134CC-2F7F-41B9-ACA6-87F0650F5D52}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "product", "product", "{8FFAECCC-B4A6-4441-AD10-379ADEDD5A19}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{F84AC200-1E5A-4FC3-9407-FB2FF527EDA8}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{D1526262-55E0-43F1-9EF1-C6095E76A9E2}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProductManagement.Domain.Shared", "modules\product\src\ProductManagement.Domain.Shared\ProductManagement.Domain.Shared.csproj", "{44A448CC-D8DD-4AA5-861A-78186FC5CE69}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProductManagement.Domain", "modules\product\src\ProductManagement.Domain\ProductManagement.Domain.csproj", "{65593638-9904-424B-831F-F5215EC4312B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProductManagement.Application.Contracts", "modules\product\src\ProductManagement.Application.Contracts\ProductManagement.Application.Contracts.csproj", "{217CD5A1-182F-4D8D-88CA-16DC1EA8525A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProductManagement.Application", "modules\product\src\ProductManagement.Application\ProductManagement.Application.csproj", "{66B2E371-2495-4E76-A6F9-540125C5FB37}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProductManagement.EntityFrameworkCore", "modules\product\src\ProductManagement.EntityFrameworkCore\ProductManagement.EntityFrameworkCore.csproj", "{B22DCAA4-FC9E-4F06-B1BA-41169341B215}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProductManagement.HttpApi", "modules\product\src\ProductManagement.HttpApi\ProductManagement.HttpApi.csproj", "{CFAD2A4B-445A-4EA3-8AF1-C054ECC2DFC5}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProductManagement.HttpApi.Client", "modules\product\src\ProductManagement.HttpApi.Client\ProductManagement.HttpApi.Client.csproj", "{4A1C1CF9-74A6-43F9-876C-BB0083EC6FB8}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProductManagement.Web", "modules\product\src\ProductManagement.Web\ProductManagement.Web.csproj", "{4A8594CB-8877-412B-9C80-90A5D3366095}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProductManagement.TestBase", "modules\product\test\ProductManagement.TestBase\ProductManagement.TestBase.csproj", "{4D3244F4-487F-4CED-A8C9-E88723EB835A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProductManagement.EntityFrameworkCore.Tests", "modules\product\test\ProductManagement.EntityFrameworkCore.Tests\ProductManagement.EntityFrameworkCore.Tests.csproj", "{1FA2B816-7841-44B0-931C-D4F84DA7E146}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProductManagement.Domain.Tests", "modules\product\test\ProductManagement.Domain.Tests\ProductManagement.Domain.Tests.csproj", "{BDCDBC2D-C05B-4A18-A698-86525E3EFC95}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ProductManagement.Application.Tests", "modules\product\test\ProductManagement.Application.Tests\ProductManagement.Application.Tests.csproj", "{B6F469F0-FB01-4A60-B6A6-D4127907E3B6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@ -37,6 +73,58 @@ Global
{06383443-5840-4C95-A038-A4B9E9211202}.Debug|Any CPU.Build.0 = Debug|Any CPU
{06383443-5840-4C95-A038-A4B9E9211202}.Release|Any CPU.ActiveCfg = Release|Any CPU
{06383443-5840-4C95-A038-A4B9E9211202}.Release|Any CPU.Build.0 = Release|Any CPU
{8A3F1AEE-5B54-48AD-8EC7-C2D9339E107C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8A3F1AEE-5B54-48AD-8EC7-C2D9339E107C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8A3F1AEE-5B54-48AD-8EC7-C2D9339E107C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8A3F1AEE-5B54-48AD-8EC7-C2D9339E107C}.Release|Any CPU.Build.0 = Release|Any CPU
{44A448CC-D8DD-4AA5-861A-78186FC5CE69}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{44A448CC-D8DD-4AA5-861A-78186FC5CE69}.Debug|Any CPU.Build.0 = Debug|Any CPU
{44A448CC-D8DD-4AA5-861A-78186FC5CE69}.Release|Any CPU.ActiveCfg = Release|Any CPU
{44A448CC-D8DD-4AA5-861A-78186FC5CE69}.Release|Any CPU.Build.0 = Release|Any CPU
{65593638-9904-424B-831F-F5215EC4312B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{65593638-9904-424B-831F-F5215EC4312B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{65593638-9904-424B-831F-F5215EC4312B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{65593638-9904-424B-831F-F5215EC4312B}.Release|Any CPU.Build.0 = Release|Any CPU
{217CD5A1-182F-4D8D-88CA-16DC1EA8525A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{217CD5A1-182F-4D8D-88CA-16DC1EA8525A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{217CD5A1-182F-4D8D-88CA-16DC1EA8525A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{217CD5A1-182F-4D8D-88CA-16DC1EA8525A}.Release|Any CPU.Build.0 = Release|Any CPU
{66B2E371-2495-4E76-A6F9-540125C5FB37}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{66B2E371-2495-4E76-A6F9-540125C5FB37}.Debug|Any CPU.Build.0 = Debug|Any CPU
{66B2E371-2495-4E76-A6F9-540125C5FB37}.Release|Any CPU.ActiveCfg = Release|Any CPU
{66B2E371-2495-4E76-A6F9-540125C5FB37}.Release|Any CPU.Build.0 = Release|Any CPU
{B22DCAA4-FC9E-4F06-B1BA-41169341B215}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B22DCAA4-FC9E-4F06-B1BA-41169341B215}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B22DCAA4-FC9E-4F06-B1BA-41169341B215}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B22DCAA4-FC9E-4F06-B1BA-41169341B215}.Release|Any CPU.Build.0 = Release|Any CPU
{CFAD2A4B-445A-4EA3-8AF1-C054ECC2DFC5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{CFAD2A4B-445A-4EA3-8AF1-C054ECC2DFC5}.Debug|Any CPU.Build.0 = Debug|Any CPU
{CFAD2A4B-445A-4EA3-8AF1-C054ECC2DFC5}.Release|Any CPU.ActiveCfg = Release|Any CPU
{CFAD2A4B-445A-4EA3-8AF1-C054ECC2DFC5}.Release|Any CPU.Build.0 = Release|Any CPU
{4A1C1CF9-74A6-43F9-876C-BB0083EC6FB8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4A1C1CF9-74A6-43F9-876C-BB0083EC6FB8}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4A1C1CF9-74A6-43F9-876C-BB0083EC6FB8}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4A1C1CF9-74A6-43F9-876C-BB0083EC6FB8}.Release|Any CPU.Build.0 = Release|Any CPU
{4A8594CB-8877-412B-9C80-90A5D3366095}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4A8594CB-8877-412B-9C80-90A5D3366095}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4A8594CB-8877-412B-9C80-90A5D3366095}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4A8594CB-8877-412B-9C80-90A5D3366095}.Release|Any CPU.Build.0 = Release|Any CPU
{4D3244F4-487F-4CED-A8C9-E88723EB835A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4D3244F4-487F-4CED-A8C9-E88723EB835A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4D3244F4-487F-4CED-A8C9-E88723EB835A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4D3244F4-487F-4CED-A8C9-E88723EB835A}.Release|Any CPU.Build.0 = Release|Any CPU
{1FA2B816-7841-44B0-931C-D4F84DA7E146}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1FA2B816-7841-44B0-931C-D4F84DA7E146}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1FA2B816-7841-44B0-931C-D4F84DA7E146}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1FA2B816-7841-44B0-931C-D4F84DA7E146}.Release|Any CPU.Build.0 = Release|Any CPU
{BDCDBC2D-C05B-4A18-A698-86525E3EFC95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BDCDBC2D-C05B-4A18-A698-86525E3EFC95}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BDCDBC2D-C05B-4A18-A698-86525E3EFC95}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BDCDBC2D-C05B-4A18-A698-86525E3EFC95}.Release|Any CPU.Build.0 = Release|Any CPU
{B6F469F0-FB01-4A60-B6A6-D4127907E3B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B6F469F0-FB01-4A60-B6A6-D4127907E3B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B6F469F0-FB01-4A60-B6A6-D4127907E3B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B6F469F0-FB01-4A60-B6A6-D4127907E3B6}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@ -48,6 +136,23 @@ Global
{E015158C-BCDB-4890-8B3B-1CEE1FC817CC} = {C53F39BA-7409-4957-8FF8-C04D7377CA62}
{72DA455F-4BD5-401D-8B2B-EE20F0C8D1AE} = {8F6834D7-E6FA-4A04-83BB-955F68EA0A0A}
{06383443-5840-4C95-A038-A4B9E9211202} = {72DA455F-4BD5-401D-8B2B-EE20F0C8D1AE}
{DB29DE67-61C2-4B21-BAE3-A9C5A5F04822} = {3B26D176-390B-4F51-BE52-E9B422C28A88}
{8A3F1AEE-5B54-48AD-8EC7-C2D9339E107C} = {DB29DE67-61C2-4B21-BAE3-A9C5A5F04822}
{8FFAECCC-B4A6-4441-AD10-379ADEDD5A19} = {818134CC-2F7F-41B9-ACA6-87F0650F5D52}
{F84AC200-1E5A-4FC3-9407-FB2FF527EDA8} = {8FFAECCC-B4A6-4441-AD10-379ADEDD5A19}
{D1526262-55E0-43F1-9EF1-C6095E76A9E2} = {8FFAECCC-B4A6-4441-AD10-379ADEDD5A19}
{44A448CC-D8DD-4AA5-861A-78186FC5CE69} = {F84AC200-1E5A-4FC3-9407-FB2FF527EDA8}
{65593638-9904-424B-831F-F5215EC4312B} = {F84AC200-1E5A-4FC3-9407-FB2FF527EDA8}
{217CD5A1-182F-4D8D-88CA-16DC1EA8525A} = {F84AC200-1E5A-4FC3-9407-FB2FF527EDA8}
{66B2E371-2495-4E76-A6F9-540125C5FB37} = {F84AC200-1E5A-4FC3-9407-FB2FF527EDA8}
{B22DCAA4-FC9E-4F06-B1BA-41169341B215} = {F84AC200-1E5A-4FC3-9407-FB2FF527EDA8}
{CFAD2A4B-445A-4EA3-8AF1-C054ECC2DFC5} = {F84AC200-1E5A-4FC3-9407-FB2FF527EDA8}
{4A1C1CF9-74A6-43F9-876C-BB0083EC6FB8} = {F84AC200-1E5A-4FC3-9407-FB2FF527EDA8}
{4A8594CB-8877-412B-9C80-90A5D3366095} = {F84AC200-1E5A-4FC3-9407-FB2FF527EDA8}
{4D3244F4-487F-4CED-A8C9-E88723EB835A} = {D1526262-55E0-43F1-9EF1-C6095E76A9E2}
{1FA2B816-7841-44B0-931C-D4F84DA7E146} = {D1526262-55E0-43F1-9EF1-C6095E76A9E2}
{BDCDBC2D-C05B-4A18-A698-86525E3EFC95} = {D1526262-55E0-43F1-9EF1-C6095E76A9E2}
{B6F469F0-FB01-4A60-B6A6-D4127907E3B6} = {D1526262-55E0-43F1-9EF1-C6095E76A9E2}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {37474F0D-2E52-4D2F-B39B-7FE3FF31B4EC}

37
samples/MicroserviceDemo/microservices/product/ProductService.Host/ProductService.Host.csproj

@ -0,0 +1,37 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PreserveCompilationContext>true</PreserveCompilationContext>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
<MvcRazorCompileOnPublish>true</MvcRazorCompileOnPublish>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.2.0" />
<PackageReference Include="Serilog.AspNetCore" Version="2.1.1" />
<PackageReference Include="Serilog.Sinks.File" Version="4.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
<PackageReference Include="IdentityServer4.AccessTokenValidation" Version="2.7.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.Autofac\Volo.Abp.Autofac.csproj" />
<ProjectReference Include="..\..\..\..\..\framework\src\Volo.Abp.EntityFrameworkCore.SqlServer\Volo.Abp.EntityFrameworkCore.SqlServer.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\audit-logging\src\Volo.Abp.AuditLogging.EntityFrameworkCore\Volo.Abp.AuditLogging.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\permission-management\src\Volo.Abp.PermissionManagement.EntityFrameworkCore\Volo.Abp.PermissionManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\..\modules\setting-management\src\Volo.Abp.SettingManagement.EntityFrameworkCore\Volo.Abp.SettingManagement.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Logs\**" />
<Content Remove="Logs\**" />
<EmbeddedResource Remove="Logs\**" />
<None Remove="Logs\**" />
</ItemGroup>
</Project>

24
samples/MicroserviceDemo/microservices/product/ProductService.Host/Program.cs

@ -0,0 +1,24 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Logging;
namespace ProductService.Host
{
public class Program
{
public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
}
public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseStartup<Startup>();
}
}

27
samples/MicroserviceDemo/microservices/product/ProductService.Host/Properties/launchSettings.json

@ -0,0 +1,27 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:60244",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"ProductService.Host": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "http://localhost:5000",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

34
samples/MicroserviceDemo/microservices/product/ProductService.Host/Startup.cs

@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Http;
using Microsoft.Extensions.DependencyInjection;
namespace ProductService.Host
{
public class Startup
{
// This method gets called by the runtime. Use this method to add services to the container.
// For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
public void ConfigureServices(IServiceCollection services)
{
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IHostingEnvironment env)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.Run(async (context) =>
{
await context.Response.WriteAsync("Hello World!");
});
}
}
}

9
samples/MicroserviceDemo/microservices/product/ProductService.Host/appsettings.Development.json

@ -0,0 +1,9 @@
{
"Logging": {
"LogLevel": {
"Default": "Debug",
"System": "Information",
"Microsoft": "Information"
}
}
}

11
samples/MicroserviceDemo/microservices/product/ProductService.Host/appsettings.json

@ -0,0 +1,11 @@
{
"ConnectionStrings": {
"Default": "Server=localhost;Database=MsDemo_Product;Trusted_Connection=True;MultipleActiveResultSets=true"
},
"Logging": {
"LogLevel": {
"Default": "Warning"
}
},
"AllowedHosts": "*"
}

6
samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/MyCompanyName/ProductManagement/Localization/ApplicationContracts/en.json

@ -0,0 +1,6 @@
{
"culture": "en",
"texts": {
"Permission:ProductManagement": "ProductManagement"
}
}

6
samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/MyCompanyName/ProductManagement/Localization/ApplicationContracts/pt-BR.json

@ -0,0 +1,6 @@
{
"culture": "pt-BR",
"texts": {
"Permission:ProductManagement": "ProductManagement"
}
}

6
samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/MyCompanyName/ProductManagement/Localization/ApplicationContracts/zh-Hans.json

@ -0,0 +1,6 @@
{
"culture": "zh-Hans",
"texts": {
"Permission:ProductManagement": "ProductManagement"
}
}

37
samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/MyCompanyName/ProductManagement/ProductManagementApplicationContractsModule.cs

@ -0,0 +1,37 @@
using Microsoft.Extensions.DependencyInjection;
using ProductManagement.Localization;
using Volo.Abp.Application;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
namespace ProductManagement
{
[DependsOn(
typeof(ProductManagementDomainSharedModule),
typeof(AbpDddApplicationModule)
)]
public class ProductManagementApplicationContractsModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<PermissionOptions>(options =>
{
options.DefinitionProviders.Add<ProductManagementPermissionDefinitionProvider>();
});
Configure<VirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<ProductManagementApplicationContractsModule>();
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Get<ProductManagementResource>()
.AddVirtualJson("/MyCompanyName/ProductManagement/Localization/ApplicationContracts");
});
}
}
}

19
samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/MyCompanyName/ProductManagement/ProductManagementPermissionDefinitionProvider.cs

@ -0,0 +1,19 @@
using ProductManagement.Localization;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Localization;
namespace ProductManagement
{
public class ProductManagementPermissionDefinitionProvider : PermissionDefinitionProvider
{
public override void Define(IPermissionDefinitionContext context)
{
//var moduleGroup = context.AddGroup(ProductManagementPermissions.GroupName, L("Permission:ProductManagement"));
}
private static LocalizableString L(string name)
{
return LocalizableString.Create<ProductManagementResource>(name);
}
}
}

15
samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/MyCompanyName/ProductManagement/ProductManagementPermissions.cs

@ -0,0 +1,15 @@
namespace ProductManagement
{
public class ProductManagementPermissions
{
public const string GroupName = "ProductManagement";
public static string[] GetAll()
{
return new[]
{
GroupName
};
}
}
}

21
samples/MicroserviceDemo/modules/product/src/ProductManagement.Application.Contracts/ProductManagement.Application.Contracts.csproj

@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\ProductManagement.Domain.Shared\ProductManagement.Domain.Shared.csproj" />
<PackageReference Include="Volo.Abp.Ddd.Application" Version="0.12.0" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="MyCompanyName\ProductManagement\Localization\ApplicationContracts\*.json" />
</ItemGroup>
<ItemGroup>
<Content Remove="MyCompanyName\ProductManagement\Localization\ApplicationContracts\*.json" />
</ItemGroup>
</Project>

12
samples/MicroserviceDemo/modules/product/src/ProductManagement.Application/MyCompanyName/ProductManagement/ProductManagementApplicationAutoMapperProfile.cs

@ -0,0 +1,12 @@
using AutoMapper;
namespace ProductManagement
{
public class ProductManagementApplicationAutoMapperProfile : Profile
{
public ProductManagementApplicationAutoMapperProfile()
{
}
}
}

28
samples/MicroserviceDemo/modules/product/src/ProductManagement.Application/MyCompanyName/ProductManagement/ProductManagementApplicationModule.cs

@ -0,0 +1,28 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
using Volo.Abp.Settings;
namespace ProductManagement
{
[DependsOn(
typeof(ProductManagementDomainModule),
typeof(ProductManagementApplicationContractsModule),
typeof(AbpAutoMapperModule)
)]
public class ProductManagementApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<ProductManagementApplicationAutoMapperProfile>(validate: true);
});
Configure<SettingOptions>(options =>
{
options.DefinitionProviders.Add<ProductManagementSettingDefinitionProvider>();
});
}
}
}

14
samples/MicroserviceDemo/modules/product/src/ProductManagement.Application/MyCompanyName/ProductManagement/ProductManagementSettingDefinitionProvider.cs

@ -0,0 +1,14 @@
using Volo.Abp.Settings;
namespace ProductManagement
{
public class ProductManagementSettingDefinitionProvider : SettingDefinitionProvider
{
public override void Define(ISettingDefinitionContext context)
{
/* Define module settings here.
* Use names from ProductManagementSettings class.
*/
}
}
}

11
samples/MicroserviceDemo/modules/product/src/ProductManagement.Application/MyCompanyName/ProductManagement/ProductManagementSettings.cs

@ -0,0 +1,11 @@
namespace ProductManagement
{
public static class ProductManagementSettings
{
public const string GroupName = "ProductManagement";
/* Add constants for setting names. Example:
* public const string MySettingName = GroupName + ".MySettingName";
*/
}
}

14
samples/MicroserviceDemo/modules/product/src/ProductManagement.Application/ProductManagement.Application.csproj

@ -0,0 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" Version="0.12.0" />
<ProjectReference Include="..\ProductManagement.Application.Contracts\ProductManagement.Application.Contracts.csproj" />
<ProjectReference Include="..\ProductManagement.Domain\ProductManagement.Domain.csproj" />
</ItemGroup>
</Project>

12
samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain.Shared/ProductManagement.Domain.Shared.csproj

@ -0,0 +1,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Localization" Version="0.12.0" />
</ItemGroup>
</Project>

10
samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain.Shared/ProductManagement/Localization/ProductManagementResource.cs

@ -0,0 +1,10 @@
using Volo.Abp.Localization;
namespace ProductManagement.Localization
{
[LocalizationResourceName("ProductManagement")]
public class ProductManagementResource
{
}
}

7
samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain.Shared/ProductManagement/ProductManagementDomainErrorCodes.cs

@ -0,0 +1,7 @@
namespace ProductManagement
{
public static class ProductManagementDomainErrorCodes
{
//Add your business exception error codes here...
}
}

21
samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain.Shared/ProductManagement/ProductManagementDomainSharedModule.cs

@ -0,0 +1,21 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Modularity;
using Volo.Abp.Localization;
using ProductManagement.Localization;
namespace ProductManagement
{
[DependsOn(
typeof(AbpLocalizationModule)
)]
public class ProductManagementDomainSharedModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpLocalizationOptions>(options =>
{
options.Resources.Add<ProductManagementResource>("en");
});
}
}
}

6
samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain/MyCompanyName/ProductManagement/Localization/Domain/en.json

@ -0,0 +1,6 @@
{
"culture": "en",
"texts": {
}
}

6
samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain/MyCompanyName/ProductManagement/Localization/Domain/pt-BR.json

@ -0,0 +1,6 @@
{
"culture": "pt-BR",
"texts": {
}
}

6
samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain/MyCompanyName/ProductManagement/Localization/Domain/zh-Hans.json

@ -0,0 +1,6 @@
{
"culture": "zh-Hans",
"texts": {
}
}

9
samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain/MyCompanyName/ProductManagement/ProductManagementConsts.cs

@ -0,0 +1,9 @@
namespace ProductManagement
{
public static class ProductManagementConsts
{
public const string DefaultDbTablePrefix = "ProductManagement";
public const string DefaultDbSchema = null;
}
}

33
samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain/MyCompanyName/ProductManagement/ProductManagementDomainModule.cs

@ -0,0 +1,33 @@
using Microsoft.Extensions.DependencyInjection;
using ProductManagement.Localization;
using Volo.Abp.Localization;
using Volo.Abp.Localization.ExceptionHandling;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
namespace ProductManagement
{
[DependsOn(
typeof(ProductManagementDomainSharedModule)
)]
public class ProductManagementDomainModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<VirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<ProductManagementDomainModule>();
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources.Get<ProductManagementResource>().AddVirtualJson("/MyCompanyName/ProductManagement/Localization/Domain");
});
Configure<ExceptionLocalizationOptions>(options =>
{
options.MapCodeNamespace("ProductManagement", typeof(ProductManagementResource));
});
}
}
}

21
samples/MicroserviceDemo/modules/product/src/ProductManagement.Domain/ProductManagement.Domain.csproj

@ -0,0 +1,21 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\ProductManagement.Domain.Shared\ProductManagement.Domain.Shared.csproj" />
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="0.12.0" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="MyCompanyName\ProductManagement\Localization\Domain\*.json" />
</ItemGroup>
<ItemGroup>
<Content Remove="MyCompanyName\ProductManagement\Localization\Domain\*.json" />
</ItemGroup>
</Project>

13
samples/MicroserviceDemo/modules/product/src/ProductManagement.EntityFrameworkCore/MyCompanyName/ProductManagement/EntityFrameworkCore/IProductManagementDbContext.cs

@ -0,0 +1,13 @@
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
namespace ProductManagement.EntityFrameworkCore
{
[ConnectionStringName("ProductManagement")]
public interface IProductManagementDbContext : IEfCoreDbContext
{
/* Add DbSet for each Aggregate Root here. Example:
* DbSet<Question> Questions { get; }
*/
}
}

35
samples/MicroserviceDemo/modules/product/src/ProductManagement.EntityFrameworkCore/MyCompanyName/ProductManagement/EntityFrameworkCore/ProductManagementDbContext.cs

@ -0,0 +1,35 @@
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
namespace ProductManagement.EntityFrameworkCore
{
[ConnectionStringName("ProductManagement")]
public class ProductManagementDbContext : AbpDbContext<ProductManagementDbContext>, IProductManagementDbContext
{
public static string TablePrefix { get; set; } = ProductManagementConsts.DefaultDbTablePrefix;
public static string Schema { get; set; } = ProductManagementConsts.DefaultDbSchema;
/* Add DbSet for each Aggregate Root here. Example:
* public DbSet<Question> Questions { get; set; }
*/
public ProductManagementDbContext(DbContextOptions<ProductManagementDbContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
builder.ConfigureProductManagement(options =>
{
options.TablePrefix = TablePrefix;
options.Schema = Schema;
});
}
}
}

38
samples/MicroserviceDemo/modules/product/src/ProductManagement.EntityFrameworkCore/MyCompanyName/ProductManagement/EntityFrameworkCore/ProductManagementDbContextModelCreatingExtensions.cs

@ -0,0 +1,38 @@
using System;
using Microsoft.EntityFrameworkCore;
using Volo.Abp;
namespace ProductManagement.EntityFrameworkCore
{
public static class ProductManagementDbContextModelCreatingExtensions
{
public static void ConfigureProductManagement(
this ModelBuilder builder,
Action<ProductManagementModelBuilderConfigurationOptions> optionsAction = null)
{
Check.NotNull(builder, nameof(builder));
var options = new ProductManagementModelBuilderConfigurationOptions();
optionsAction?.Invoke(options);
/* Configure all entities here. Example:
builder.Entity<Question>(b =>
{
//Configure table & schema name
//b.ToTable(options.TablePrefix + "Questions", options.Schema);
//Properties
//b.Property(q => q.Title).IsRequired().HasMaxLength(QuestionConsts.MaxTitleLength);
//Configure relations
//b.HasMany(question => question.Tags).WithOne().HasForeignKey(qt => qt.QuestionId);
//Configure indexes
//b.HasIndex(q => q.CreationTime);
});
*/
}
}
}

23
samples/MicroserviceDemo/modules/product/src/ProductManagement.EntityFrameworkCore/MyCompanyName/ProductManagement/EntityFrameworkCore/ProductManagementEntityFrameworkCoreModule.cs

@ -0,0 +1,23 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Modularity;
namespace ProductManagement.EntityFrameworkCore
{
[DependsOn(
typeof(ProductManagementDomainModule),
typeof(AbpEntityFrameworkCoreModule)
)]
public class ProductManagementEntityFrameworkCoreModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDbContext<ProductManagementDbContext>(options =>
{
/* Add custom repositories here. Example:
* options.AddRepository<Question, EfCoreQuestionRepository>();
*/
});
}
}
}

18
samples/MicroserviceDemo/modules/product/src/ProductManagement.EntityFrameworkCore/MyCompanyName/ProductManagement/EntityFrameworkCore/ProductManagementModelBuilderConfigurationOptions.cs

@ -0,0 +1,18 @@
using JetBrains.Annotations;
using Volo.Abp.EntityFrameworkCore.Modeling;
namespace ProductManagement.EntityFrameworkCore
{
public class ProductManagementModelBuilderConfigurationOptions : ModelBuilderConfigurationOptions
{
public ProductManagementModelBuilderConfigurationOptions(
[NotNull] string tablePrefix = ProductManagementConsts.DefaultDbTablePrefix,
[CanBeNull] string schema = ProductManagementConsts.DefaultDbSchema)
: base(
tablePrefix,
schema)
{
}
}
}

13
samples/MicroserviceDemo/modules/product/src/ProductManagement.EntityFrameworkCore/ProductManagement.EntityFrameworkCore.csproj

@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\ProductManagement.Domain\ProductManagement.Domain.csproj" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="0.12.0" />
</ItemGroup>
</Project>

22
samples/MicroserviceDemo/modules/product/src/ProductManagement.HttpApi.Client/MyCompanyName/ProductManagement/ProductManagementHttpApiClientModule.cs

@ -0,0 +1,22 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Http.Client;
using Volo.Abp.Modularity;
namespace ProductManagement
{
[DependsOn(
typeof(ProductManagementApplicationContractsModule),
typeof(AbpHttpClientModule))]
public class ProductManagementHttpApiClientModule : AbpModule
{
public const string RemoteServiceName = "ProductManagement";
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddHttpClientProxies(
typeof(ProductManagementApplicationContractsModule).Assembly,
RemoteServiceName
);
}
}
}

13
samples/MicroserviceDemo/modules/product/src/ProductManagement.HttpApi.Client/ProductManagement.HttpApi.Client.csproj

@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\ProductManagement.Application.Contracts\ProductManagement.Application.Contracts.csproj" />
<PackageReference Include="Volo.Abp.Http.Client" Version="0.12.0" />
</ItemGroup>
</Project>

13
samples/MicroserviceDemo/modules/product/src/ProductManagement.HttpApi/MyCompanyName/ProductManagement/ProductManagementHttpApiModule.cs

@ -0,0 +1,13 @@
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Modularity;
namespace ProductManagement
{
[DependsOn(
typeof(ProductManagementApplicationContractsModule),
typeof(AbpAspNetCoreMvcModule))]
public class ProductManagementHttpApiModule : AbpModule
{
}
}

13
samples/MicroserviceDemo/modules/product/src/ProductManagement.HttpApi/ProductManagement.HttpApi.csproj

@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\ProductManagement.Application.Contracts\ProductManagement.Application.Contracts.csproj" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc" Version="0.12.0" />
</ItemGroup>
</Project>

6
samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/Localization/Resources/ProductManagement/en.json

@ -0,0 +1,6 @@
{
"culture": "en",
"texts": {
}
}

6
samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/Localization/Resources/ProductManagement/pt-BR.json

@ -0,0 +1,6 @@
{
"culture": "pt-BR",
"texts": {
}
}

6
samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/Localization/Resources/ProductManagement/zh-Hans.json

@ -0,0 +1,6 @@
{
"culture": "zh-Hans",
"texts": {
}
}

4
samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/Pages/ProductManagement/_ViewImports.cshtml

@ -0,0 +1,4 @@
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling

35
samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/ProductManagement.Web.csproj

@ -0,0 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
<IsPackable>true</IsPackable>
<OutputType>Library</OutputType>
<RootNamespace>ProductManagement</RootNamespace>
</PropertyGroup>
<ItemGroup>
<EmbeddedResource Include="wwwroot\**\*.*" />
<EmbeddedResource Include="Pages\**\*.cshtml" Exclude="*.cs" />
<EmbeddedResource Include="Localization\Resources\**\*.json" />
</ItemGroup>
<ItemGroup>
<Content Remove="wwwroot\**\*.*" />
<Content Remove="Pages\**\*.cshtml" />
<Content Remove="Localization\Resources\**\*.json" />
<Content Remove="Properties\launchSettings.json" />
<None Include="Properties\launchSettings.json" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\ProductManagement.HttpApi\ProductManagement.HttpApi.csproj" />
<PackageReference Include="Volo.Abp.AutoMapper" Version="0.12.0" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared" Version="0.12.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="wwwroot\" />
</ItemGroup>
</Project>

23
samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/ProductManagementMenuContributor.cs

@ -0,0 +1,23 @@
using System.Threading.Tasks;
using Volo.Abp.UI.Navigation;
namespace ProductManagement
{
public class ProductManagementMenuContributor : IMenuContributor
{
public async Task ConfigureMenuAsync(MenuConfigurationContext context)
{
if (context.Menu.Name == StandardMenus.Main)
{
await ConfigureMainMenu(context);
}
}
private Task ConfigureMainMenu(MenuConfigurationContext context)
{
//Add main menu items.
return Task.CompletedTask;
}
}
}

12
samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/ProductManagementWebAutoMapperProfile.cs

@ -0,0 +1,12 @@
using AutoMapper;
namespace ProductManagement
{
public class ProductManagementWebAutoMapperProfile : Profile
{
public ProductManagementWebAutoMapperProfile()
{
//Create mappings.
}
}
}

62
samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/ProductManagementWebModule.cs

@ -0,0 +1,62 @@
using Localization.Resources.AbpUi;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.DependencyInjection;
using ProductManagement.Localization;
using Volo.Abp.AspNetCore.Mvc.Localization;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
using Volo.Abp.AutoMapper;
using Volo.Abp.Localization;
using Volo.Abp.Localization.Resources.AbpValidation;
using Volo.Abp.Modularity;
using Volo.Abp.UI.Navigation;
using Volo.Abp.VirtualFileSystem;
namespace ProductManagement
{
[DependsOn(typeof(ProductManagementHttpApiModule))]
[DependsOn(typeof(AbpAspNetCoreMvcUiThemeSharedModule))]
[DependsOn(typeof(AbpAutoMapperModule))]
public class ProductManagementWebModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
context.Services.PreConfigure<AbpMvcDataAnnotationsLocalizationOptions>(options =>
{
options.AddAssemblyResource(typeof(ProductManagementResource), typeof(ProductManagementWebModule).Assembly);
});
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<NavigationOptions>(options =>
{
options.MenuContributors.Add(new ProductManagementMenuContributor());
});
Configure<VirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<ProductManagementWebModule>("ProductManagement");
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Get<ProductManagementResource>()
.AddBaseTypes(
typeof(AbpValidationResource),
typeof(AbpUiResource)
).AddVirtualJson("/Localization/Resources/ProductManagement");
});
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<ProductManagementWebAutoMapperProfile>(validate: true);
});
Configure<RazorPagesOptions>(options =>
{
//Configure authorization.
});
}
}
}

27
samples/MicroserviceDemo/modules/product/src/ProductManagement.Web/Properties/launchSettings.json

@ -0,0 +1,27 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:56993/",
"sslPort": 0
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"ProductManagement.Web": {
"commandName": "Project",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"applicationUrl": "http://localhost:56994/"
}
}
}

13
samples/MicroserviceDemo/modules/product/test/ProductManagement.Application.Tests/MyCompanyName/ProductManagement/ProductManagementApplicationTestModule.cs

@ -0,0 +1,13 @@
using Volo.Abp.Modularity;
namespace ProductManagement
{
[DependsOn(
typeof(ProductManagementApplicationModule),
typeof(ProductManagementDomainTestModule)
)]
public class ProductManagementApplicationTestModule : AbpModule
{
}
}

17
samples/MicroserviceDemo/modules/product/test/ProductManagement.Application.Tests/ProductManagement.Application.Tests.csproj

@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\ProductManagement.Application\ProductManagement.Application.csproj" />
<ProjectReference Include="..\ProductManagement.Domain.Tests\ProductManagement.Domain.Tests.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
</ItemGroup>
</Project>

7
samples/MicroserviceDemo/modules/product/test/ProductManagement.Domain.Tests/MyCompanyName/ProductManagement/ProductManagementDomainTestBase.cs

@ -0,0 +1,7 @@
namespace ProductManagement
{
public abstract class ProductManagementDomainTestBase : ProductManagementTestBase<ProductManagementDomainTestModule>
{
}
}

13
samples/MicroserviceDemo/modules/product/test/ProductManagement.Domain.Tests/MyCompanyName/ProductManagement/ProductManagementDomainTestModule.cs

@ -0,0 +1,13 @@
using ProductManagement.EntityFrameworkCore;
using Volo.Abp.Modularity;
namespace ProductManagement
{
[DependsOn(
typeof(ProductManagementEntityFrameworkCoreTestModule)
)]
public class ProductManagementDomainTestModule : AbpModule
{
}
}

16
samples/MicroserviceDemo/modules/product/test/ProductManagement.Domain.Tests/ProductManagement.Domain.Tests.csproj

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\ProductManagement.EntityFrameworkCore.Tests\ProductManagement.EntityFrameworkCore.Tests.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
</ItemGroup>
</Project>

7
samples/MicroserviceDemo/modules/product/test/ProductManagement.EntityFrameworkCore.Tests/MyCompanyName/ProductManagement/EntityFrameworkCore/MyEntityRepository_Tests.cs

@ -0,0 +1,7 @@
namespace ProductManagement.EntityFrameworkCore
{
public class MyEntityRepository_Tests : MyEntityRepository_Tests<ProductManagementEntityFrameworkCoreTestModule>
{
}
}

42
samples/MicroserviceDemo/modules/product/test/ProductManagement.EntityFrameworkCore.Tests/MyCompanyName/ProductManagement/EntityFrameworkCore/ProductManagementEntityFrameworkCoreTestModule.cs

@ -0,0 +1,42 @@
using Microsoft.Data.Sqlite;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Modularity;
namespace ProductManagement.EntityFrameworkCore
{
[DependsOn(
typeof(ProductManagementTestBaseModule),
typeof(ProductManagementEntityFrameworkCoreModule)
)]
public class ProductManagementEntityFrameworkCoreTestModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var sqliteConnection = CreateDatabaseAndGetConnection();
Configure<AbpDbContextOptions>(options =>
{
options.Configure(abpDbContextConfigurationContext =>
{
abpDbContextConfigurationContext.DbContextOptions.UseSqlite(sqliteConnection);
});
});
}
private static SqliteConnection CreateDatabaseAndGetConnection()
{
var connection = new SqliteConnection("Data Source=:memory:");
connection.Open();
new ProductManagementDbContext(
new DbContextOptionsBuilder<ProductManagementDbContext>().UseSqlite(connection).Options
).GetService<IRelationalDatabaseCreator>().CreateTables();
return connection;
}
}
}

20
samples/MicroserviceDemo/modules/product/test/ProductManagement.EntityFrameworkCore.Tests/ProductManagement.EntityFrameworkCore.Tests.csproj

@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\ProductManagement.EntityFrameworkCore\ProductManagement.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\ProductManagement.TestBase\ProductManagement.TestBase.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="Microsoft.Data.Sqlite" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.2.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="2.2.0" />
</ItemGroup>
</Project>

16
samples/MicroserviceDemo/modules/product/test/ProductManagement.TestBase/MyCompanyName/ProductManagement/MyEntityRepository_Tests.cs

@ -0,0 +1,16 @@
using System.Threading.Tasks;
using Volo.Abp.Modularity;
using Xunit;
namespace ProductManagement
{
public abstract class MyEntityRepository_Tests<TStartupModule> : ProductManagementTestBase<TStartupModule>
where TStartupModule : IAbpModule
{
[Fact]
public async Task Test1()
{
}
}
}

14
samples/MicroserviceDemo/modules/product/test/ProductManagement.TestBase/MyCompanyName/ProductManagement/ProductManagementTestBase.cs

@ -0,0 +1,14 @@
using Volo.Abp;
using Volo.Abp.Modularity;
namespace ProductManagement
{
public abstract class ProductManagementTestBase<TStartupModule> : AbpIntegratedTest<TStartupModule>
where TStartupModule : IAbpModule
{
protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options)
{
options.UseAutofac();
}
}
}

37
samples/MicroserviceDemo/modules/product/test/ProductManagement.TestBase/MyCompanyName/ProductManagement/ProductManagementTestBaseModule.cs

@ -0,0 +1,37 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp;
using Volo.Abp.Authorization;
using Volo.Abp.Autofac;
using Volo.Abp.Modularity;
namespace ProductManagement
{
[DependsOn(
typeof(AbpAutofacModule),
typeof(AbpTestBaseModule),
typeof(AbpAuthorizationModule),
typeof(ProductManagementDomainModule)
)]
public class ProductManagementTestBaseModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAlwaysAllowAuthorization();
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
SeedTestData(context);
}
private static void SeedTestData(ApplicationInitializationContext context)
{
using (var scope = context.ServiceProvider.CreateScope())
{
scope.ServiceProvider
.GetRequiredService<ProductManagementTestDataBuilder>()
.Build();
}
}
}
}

8
samples/MicroserviceDemo/modules/product/test/ProductManagement.TestBase/MyCompanyName/ProductManagement/ProductManagementTestData.cs

@ -0,0 +1,8 @@
using Volo.Abp.DependencyInjection;
namespace ProductManagement
{
public class ProductManagementTestData : ISingletonDependency
{
}
}

24
samples/MicroserviceDemo/modules/product/test/ProductManagement.TestBase/MyCompanyName/ProductManagement/ProductManagementTestDataBuilder.cs

@ -0,0 +1,24 @@
using Volo.Abp.DependencyInjection;
using Volo.Abp.Guids;
namespace ProductManagement
{
public class ProductManagementTestDataBuilder : ITransientDependency
{
private readonly IGuidGenerator _guidGenerator;
private ProductManagementTestData _testData;
public ProductManagementTestDataBuilder(
IGuidGenerator guidGenerator,
ProductManagementTestData testData)
{
_guidGenerator = guidGenerator;
_testData = testData;
}
public void Build()
{
}
}
}

24
samples/MicroserviceDemo/modules/product/test/ProductManagement.TestBase/ProductManagement.TestBase.csproj

@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework>
<RootNamespace />
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Autofac" Version="0.12.0" />
<PackageReference Include="Volo.Abp.Authorization" Version="0.12.0" />
<PackageReference Include="Volo.Abp.TestBase" Version="0.12.0" />
<ProjectReference Include="..\..\src\ProductManagement.Domain\ProductManagement.Domain.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="NSubstitute" Version="3.1.0" />
<PackageReference Include="Shouldly" Version="3.0.2" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.extensibility.execution" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1" />
</ItemGroup>
</Project>
Loading…
Cancel
Save