Browse Source

removed saas service

This service was tenant management functionality
pull/26/head
Galip Tolga Erdem 5 years ago
parent
commit
1c49d49e19
  1. 7
      EShopOnAbp.sln
  2. 1
      services/saas/.gitattributes
  3. 258
      services/saas/.gitignore
  4. 116
      services/saas/EShopOnAbp.SaasService.sln
  5. 23
      services/saas/EShopOnAbp.SaasService.sln.DotSettings
  6. 6
      services/saas/NuGet.Config
  7. 15
      services/saas/src/EShopOnAbp.SaasService.Application.Contracts/EShopOnAbp.SaasService.Application.Contracts.csproj
  8. 14
      services/saas/src/EShopOnAbp.SaasService.Application.Contracts/SaasServiceApplicationContractsModule.cs
  9. 7
      services/saas/src/EShopOnAbp.SaasService.Application.Contracts/SaasServiceRemoteServiceConsts.cs
  10. 16
      services/saas/src/EShopOnAbp.SaasService.Application/EShopOnAbp.SaasService.Application.csproj
  11. 14
      services/saas/src/EShopOnAbp.SaasService.Application/SaasServiceApplicationAutoMapperProfile.cs
  12. 23
      services/saas/src/EShopOnAbp.SaasService.Application/SaasServiceApplicationModule.cs
  13. 49
      services/saas/src/EShopOnAbp.SaasService.Application/SaasTenantAppService.cs
  14. 16
      services/saas/src/EShopOnAbp.SaasService.Blazor/EShopOnAbp.SaasService.Blazor.csproj
  15. 24
      services/saas/src/EShopOnAbp.SaasService.Blazor/Menus/SaasServiceMenuContributor.cs
  16. 11
      services/saas/src/EShopOnAbp.SaasService.Blazor/Menus/SaasServiceMenus.cs
  17. 8
      services/saas/src/EShopOnAbp.SaasService.Blazor/Pages/SaasService/Index.razor
  18. 14
      services/saas/src/EShopOnAbp.SaasService.Blazor/SaasServiceBlazorAutoMapperProfile.cs
  19. 37
      services/saas/src/EShopOnAbp.SaasService.Blazor/SaasServiceBlazorModule.cs
  20. 5
      services/saas/src/EShopOnAbp.SaasService.Blazor/_Imports.razor
  21. 24
      services/saas/src/EShopOnAbp.SaasService.Domain.Shared/EShopOnAbp.SaasService.Domain.Shared.csproj
  22. 7
      services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/ar.json
  23. 7
      services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/cs.json
  24. 7
      services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/de-DE.json
  25. 7
      services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/en-GB.json
  26. 7
      services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/en.json
  27. 7
      services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/es.json
  28. 7
      services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/fr.json
  29. 7
      services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/hu.json
  30. 7
      services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/nl.json
  31. 6
      services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/pl-PL.json
  32. 6
      services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/pt-BR.json
  33. 6
      services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/sl.json
  34. 7
      services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/tr.json
  35. 6
      services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/vi.json
  36. 7
      services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/zh-Hans.json
  37. 6
      services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/zh-Hant.json
  38. 10
      services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasServiceResource.cs
  39. 31
      services/saas/src/EShopOnAbp.SaasService.Domain.Shared/SaasServiceDomainSharedModule.cs
  40. 7
      services/saas/src/EShopOnAbp.SaasService.Domain.Shared/SaasServiceErrorCodes.cs
  41. 15
      services/saas/src/EShopOnAbp.SaasService.Domain/EShopOnAbp.SaasService.Domain.csproj
  42. 11
      services/saas/src/EShopOnAbp.SaasService.Domain/SaasServiceDbProperties.cs
  43. 14
      services/saas/src/EShopOnAbp.SaasService.Domain/SaasServiceDomainModule.cs
  44. 25
      services/saas/src/EShopOnAbp.SaasService.EntityFrameworkCore/EShopOnAbp.SaasService.EntityFrameworkCore.csproj
  45. 27
      services/saas/src/EShopOnAbp.SaasService.EntityFrameworkCore/EntityFrameworkCore/SaasServiceDbContext.cs
  46. 44
      services/saas/src/EShopOnAbp.SaasService.EntityFrameworkCore/EntityFrameworkCore/SaasServiceDbContextFactory.cs
  47. 39
      services/saas/src/EShopOnAbp.SaasService.EntityFrameworkCore/EntityFrameworkCore/SaasServiceEntityFrameworkCoreModule.cs
  48. 121
      services/saas/src/EShopOnAbp.SaasService.EntityFrameworkCore/Migrations/20211006102216_Initial.Designer.cs
  49. 67
      services/saas/src/EShopOnAbp.SaasService.EntityFrameworkCore/Migrations/20211006102216_Initial.cs
  50. 119
      services/saas/src/EShopOnAbp.SaasService.EntityFrameworkCore/Migrations/SaasServiceDbContextModelSnapshot.cs
  51. 18
      services/saas/src/EShopOnAbp.SaasService.HttpApi.Client/EShopOnAbp.SaasService.HttpApi.Client.csproj
  52. 20
      services/saas/src/EShopOnAbp.SaasService.HttpApi.Client/SaasServiceHttpApiClientModule.cs
  53. 13
      services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/Controllers/HomeController.cs
  54. 27
      services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/DbMigrations/SaasServiceDatabaseMigrationChecker.cs
  55. 55
      services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/DbMigrations/SaasServiceDatabaseMigrationEventHandler.cs
  56. 52
      services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/Dockerfile
  57. 4
      services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/Dockerfile.local
  58. 30
      services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/EShopOnAbp.SaasService.HttpApi.Host.csproj
  59. 48
      services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/Program.cs
  60. 27
      services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/Properties/launchSettings.json
  61. 125
      services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/SaasServiceHttpApiHostModule.cs
  62. 21
      services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/Startup.cs
  63. 44
      services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/appsettings.json
  64. 18
      services/saas/src/EShopOnAbp.SaasService.HttpApi/EShopOnAbp.SaasService.HttpApi.csproj
  65. 13
      services/saas/src/EShopOnAbp.SaasService.HttpApi/SaasServiceHttpApiModule.cs
  66. 14
      services/saas/test/EShopOnAbp.SaasService.Application.Tests/EShopOnAbp.SaasService.Application.Tests.csproj
  67. 3
      services/saas/test/EShopOnAbp.SaasService.Application.Tests/FodyWeavers.xml
  68. 30
      services/saas/test/EShopOnAbp.SaasService.Application.Tests/FodyWeavers.xsd
  69. 10
      services/saas/test/EShopOnAbp.SaasService.Application.Tests/SaasServiceApplicationTestBase.cs
  70. 13
      services/saas/test/EShopOnAbp.SaasService.Application.Tests/SaasServiceApplicationTestModule.cs
  71. 13
      services/saas/test/EShopOnAbp.SaasService.Domain.Tests/EShopOnAbp.SaasService.Domain.Tests.csproj
  72. 3
      services/saas/test/EShopOnAbp.SaasService.Domain.Tests/FodyWeavers.xml
  73. 30
      services/saas/test/EShopOnAbp.SaasService.Domain.Tests/FodyWeavers.xsd
  74. 10
      services/saas/test/EShopOnAbp.SaasService.Domain.Tests/SaasServiceDomainTestBase.cs
  75. 17
      services/saas/test/EShopOnAbp.SaasService.Domain.Tests/SaasServiceDomainTestModule.cs
  76. 21
      services/saas/test/EShopOnAbp.SaasService.Domain.Tests/Samples/SampleManager_Tests.cs
  77. 16
      services/saas/test/EShopOnAbp.SaasService.EntityFrameworkCore.Tests/EShopOnAbp.SaasService.EntityFrameworkCore.Tests.csproj
  78. 10
      services/saas/test/EShopOnAbp.SaasService.EntityFrameworkCore.Tests/EntityFrameworkCore/SaasServiceEntityFrameworkCoreTestBase.cs
  79. 43
      services/saas/test/EShopOnAbp.SaasService.EntityFrameworkCore.Tests/EntityFrameworkCore/SaasServiceEntityFrameworkCoreTestModule.cs
  80. 3
      services/saas/test/EShopOnAbp.SaasService.EntityFrameworkCore.Tests/FodyWeavers.xml
  81. 30
      services/saas/test/EShopOnAbp.SaasService.EntityFrameworkCore.Tests/FodyWeavers.xsd
  82. 156
      services/saas/test/EShopOnAbp.SaasService.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs
  83. 26
      services/saas/test/EShopOnAbp.SaasService.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs
  84. 26
      services/saas/test/EShopOnAbp.SaasService.HttpApi.Client.ConsoleTestApp/EShopOnAbp.SaasService.HttpApi.Client.ConsoleTestApp.csproj
  85. 21
      services/saas/test/EShopOnAbp.SaasService.HttpApi.Client.ConsoleTestApp/Program.cs
  86. 14
      services/saas/test/EShopOnAbp.SaasService.HttpApi.Client.ConsoleTestApp/SaasServiceConsoleApiClientModule.cs
  87. 21
      services/saas/test/EShopOnAbp.SaasService.HttpApi.Client.ConsoleTestApp/appsettings.json
  88. 17
      services/saas/test/EShopOnAbp.SaasService.MongoDB.Tests/EShopOnAbp.SaasService.MongoDB.Tests.csproj
  89. 3
      services/saas/test/EShopOnAbp.SaasService.MongoDB.Tests/FodyWeavers.xml
  90. 30
      services/saas/test/EShopOnAbp.SaasService.MongoDB.Tests/FodyWeavers.xsd
  91. 22
      services/saas/test/EShopOnAbp.SaasService.MongoDB.Tests/MongoDB/MongoDbFixture.cs
  92. 10
      services/saas/test/EShopOnAbp.SaasService.MongoDB.Tests/MongoDB/MongoTestCollection.cs
  93. 10
      services/saas/test/EShopOnAbp.SaasService.MongoDB.Tests/MongoDB/SaasServiceMongoDbTestBase.cs
  94. 27
      services/saas/test/EShopOnAbp.SaasService.MongoDB.Tests/MongoDB/SaasServiceMongoDbTestModule.cs
  95. 14
      services/saas/test/EShopOnAbp.SaasService.MongoDB.Tests/MongoDB/Samples/SampleRepository_Tests.cs
  96. 21
      services/saas/test/EShopOnAbp.SaasService.TestBase/EShopOnAbp.SaasService.TestBase.csproj
  97. 3
      services/saas/test/EShopOnAbp.SaasService.TestBase/FodyWeavers.xml
  98. 30
      services/saas/test/EShopOnAbp.SaasService.TestBase/FodyWeavers.xsd
  99. 33
      services/saas/test/EShopOnAbp.SaasService.TestBase/SaasServiceDataSeedContributor.cs
  100. 60
      services/saas/test/EShopOnAbp.SaasService.TestBase/SaasServiceTestBase.cs

7
EShopOnAbp.sln

@ -23,8 +23,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.Shared.Hosting.M
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.AdministrationService.HttpApi.Host", "services\administration\src\EShopOnAbp.AdministrationService.HttpApi.Host\EShopOnAbp.AdministrationService.HttpApi.Host.csproj", "{0FA9667E-6A08-4EFF-8CAF-D2A3C3C1FBBD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.SaasService.HttpApi.Host", "services\saas\src\EShopOnAbp.SaasService.HttpApi.Host\EShopOnAbp.SaasService.HttpApi.Host.csproj", "{9203C6CC-F491-4A9F-93B3-3BEA018D87B4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.IdentityService.HttpApi.Host", "services\identity\src\EShopOnAbp.IdentityService.HttpApi.Host\EShopOnAbp.IdentityService.HttpApi.Host.csproj", "{FDFCA1B4-FD9D-445C-8655-3DF3F2D57CEA}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.Shared.Hosting.Gateways", "shared\EShopOnAbp.Shared.Hosting.Gateways\EShopOnAbp.Shared.Hosting.Gateways.csproj", "{590B609C-5887-4896-9FC5-5E54A2658B18}"
@ -73,10 +71,6 @@ Global
{0FA9667E-6A08-4EFF-8CAF-D2A3C3C1FBBD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0FA9667E-6A08-4EFF-8CAF-D2A3C3C1FBBD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0FA9667E-6A08-4EFF-8CAF-D2A3C3C1FBBD}.Release|Any CPU.Build.0 = Release|Any CPU
{9203C6CC-F491-4A9F-93B3-3BEA018D87B4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{9203C6CC-F491-4A9F-93B3-3BEA018D87B4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9203C6CC-F491-4A9F-93B3-3BEA018D87B4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9203C6CC-F491-4A9F-93B3-3BEA018D87B4}.Release|Any CPU.Build.0 = Release|Any CPU
{FDFCA1B4-FD9D-445C-8655-3DF3F2D57CEA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{FDFCA1B4-FD9D-445C-8655-3DF3F2D57CEA}.Debug|Any CPU.Build.0 = Debug|Any CPU
{FDFCA1B4-FD9D-445C-8655-3DF3F2D57CEA}.Release|Any CPU.ActiveCfg = Release|Any CPU
@ -124,7 +118,6 @@ Global
{2B608875-8226-44E4-B93A-D475E11A7B80} = {B8B59303-2178-459B-91A8-DF353044E090}
{49DDB3F1-6200-445E-9A0D-0339E31D5D77} = {B8B59303-2178-459B-91A8-DF353044E090}
{0FA9667E-6A08-4EFF-8CAF-D2A3C3C1FBBD} = {F415FFFD-E52D-4EBE-98DC-067C1EFFFFE3}
{9203C6CC-F491-4A9F-93B3-3BEA018D87B4} = {F415FFFD-E52D-4EBE-98DC-067C1EFFFFE3}
{FDFCA1B4-FD9D-445C-8655-3DF3F2D57CEA} = {F415FFFD-E52D-4EBE-98DC-067C1EFFFFE3}
{590B609C-5887-4896-9FC5-5E54A2658B18} = {B8B59303-2178-459B-91A8-DF353044E090}
{5D653BE4-7653-4684-B9F0-9A9B955093E5} = {1484E912-DCF3-4568-A72C-4C7622104DB8}

1
services/saas/.gitattributes

@ -1 +0,0 @@
**/wwwroot/libs/** linguist-vendored

258
services/saas/.gitignore

@ -1,258 +0,0 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# DNX
project.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# TODO: Comment the next line if you want to checkin your web deploy settings
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# JetBrains Rider
.idea/
*.sln.iml
# SaasService
host/EShopOnAbp.SaasService.IdentityServer/Logs/logs.txt
host/EShopOnAbp.SaasService.HttpApi.Host/Logs/logs.txt
host/EShopOnAbp.SaasService.Web.Host/Logs/logs.txt
host/EShopOnAbp.SaasService.Web.Unified/Logs/logs.txt

116
services/saas/EShopOnAbp.SaasService.sln

@ -1,116 +0,0 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29001.49
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.SaasService.Domain.Shared", "src\EShopOnAbp.SaasService.Domain.Shared\EShopOnAbp.SaasService.Domain.Shared.csproj", "{D64C1577-4929-4B60-939E-96DE1534891A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.SaasService.Domain", "src\EShopOnAbp.SaasService.Domain\EShopOnAbp.SaasService.Domain.csproj", "{F2840BC7-0188-4606-9126-DADD0F5ABF7A}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.SaasService.Application.Contracts", "src\EShopOnAbp.SaasService.Application.Contracts\EShopOnAbp.SaasService.Application.Contracts.csproj", "{BD65D04F-08D5-40C1-8C24-77CA0BACB877}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.SaasService.Application", "src\EShopOnAbp.SaasService.Application\EShopOnAbp.SaasService.Application.csproj", "{78040F9E-3501-4A40-82DF-00A597710F35}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{649A3FFA-182F-4E56-9717-E6A9A2BEC545}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.SaasService.EntityFrameworkCore", "src\EShopOnAbp.SaasService.EntityFrameworkCore\EShopOnAbp.SaasService.EntityFrameworkCore.csproj", "{0CE86223-D31D-4315-A1F5-87BA3EE1B844}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.SaasService.HttpApi", "src\EShopOnAbp.SaasService.HttpApi\EShopOnAbp.SaasService.HttpApi.csproj", "{077AA5F8-8B61-420C-A6B5-0150A66FDB34}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.SaasService.HttpApi.Client", "src\EShopOnAbp.SaasService.HttpApi.Client\EShopOnAbp.SaasService.HttpApi.Client.csproj", "{36E2735F-CEAB-44C8-A6D1-2CDAFF399751}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.SaasService.TestBase", "test\EShopOnAbp.SaasService.TestBase\EShopOnAbp.SaasService.TestBase.csproj", "{C5BB573D-3030-4BCB-88B7-F6A85C32766C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.SaasService.EntityFrameworkCore.Tests", "test\EShopOnAbp.SaasService.EntityFrameworkCore.Tests\EShopOnAbp.SaasService.EntityFrameworkCore.Tests.csproj", "{527F645C-C1FC-406E-8479-81386C8ECF13}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.SaasService.Domain.Tests", "test\EShopOnAbp.SaasService.Domain.Tests\EShopOnAbp.SaasService.Domain.Tests.csproj", "{E60895E5-79C4-447D-88B7-85CB5BA336A4}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EShopOnAbp.SaasService.Application.Tests", "test\EShopOnAbp.SaasService.Application.Tests\EShopOnAbp.SaasService.Application.Tests.csproj", "{90CB5DC4-C040-45C7-8900-9688B26405BC}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EShopOnAbp.SaasService.Blazor", "src\EShopOnAbp.SaasService.Blazor\EShopOnAbp.SaasService.Blazor.csproj", "{827FCC18-A22B-4175-82CD-1233F6DEE8FB}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "EShopOnAbp.SaasService.HttpApi.Host", "src\EShopOnAbp.SaasService.HttpApi.Host\EShopOnAbp.SaasService.HttpApi.Host.csproj", "{D651FE09-CF19-472F-819C-47FECD4A697E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{D64C1577-4929-4B60-939E-96DE1534891A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D64C1577-4929-4B60-939E-96DE1534891A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D64C1577-4929-4B60-939E-96DE1534891A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D64C1577-4929-4B60-939E-96DE1534891A}.Release|Any CPU.Build.0 = Release|Any CPU
{F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F2840BC7-0188-4606-9126-DADD0F5ABF7A}.Release|Any CPU.Build.0 = Release|Any CPU
{BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Debug|Any CPU.Build.0 = Debug|Any CPU
{BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Release|Any CPU.ActiveCfg = Release|Any CPU
{BD65D04F-08D5-40C1-8C24-77CA0BACB877}.Release|Any CPU.Build.0 = Release|Any CPU
{78040F9E-3501-4A40-82DF-00A597710F35}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{78040F9E-3501-4A40-82DF-00A597710F35}.Debug|Any CPU.Build.0 = Debug|Any CPU
{78040F9E-3501-4A40-82DF-00A597710F35}.Release|Any CPU.ActiveCfg = Release|Any CPU
{78040F9E-3501-4A40-82DF-00A597710F35}.Release|Any CPU.Build.0 = Release|Any CPU
{0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0CE86223-D31D-4315-A1F5-87BA3EE1B844}.Release|Any CPU.Build.0 = Release|Any CPU
{077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Debug|Any CPU.Build.0 = Debug|Any CPU
{077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Release|Any CPU.ActiveCfg = Release|Any CPU
{077AA5F8-8B61-420C-A6B5-0150A66FDB34}.Release|Any CPU.Build.0 = Release|Any CPU
{36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Debug|Any CPU.Build.0 = Debug|Any CPU
{36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Release|Any CPU.ActiveCfg = Release|Any CPU
{36E2735F-CEAB-44C8-A6D1-2CDAFF399751}.Release|Any CPU.Build.0 = Release|Any CPU
{C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C5BB573D-3030-4BCB-88B7-F6A85C32766C}.Release|Any CPU.Build.0 = Release|Any CPU
{527F645C-C1FC-406E-8479-81386C8ECF13}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{527F645C-C1FC-406E-8479-81386C8ECF13}.Debug|Any CPU.Build.0 = Debug|Any CPU
{527F645C-C1FC-406E-8479-81386C8ECF13}.Release|Any CPU.ActiveCfg = Release|Any CPU
{527F645C-C1FC-406E-8479-81386C8ECF13}.Release|Any CPU.Build.0 = Release|Any CPU
{E60895E5-79C4-447D-88B7-85CB5BA336A4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E60895E5-79C4-447D-88B7-85CB5BA336A4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E60895E5-79C4-447D-88B7-85CB5BA336A4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E60895E5-79C4-447D-88B7-85CB5BA336A4}.Release|Any CPU.Build.0 = Release|Any CPU
{90CB5DC4-C040-45C7-8900-9688B26405BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{90CB5DC4-C040-45C7-8900-9688B26405BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{90CB5DC4-C040-45C7-8900-9688B26405BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{90CB5DC4-C040-45C7-8900-9688B26405BC}.Release|Any CPU.Build.0 = Release|Any CPU
{827FCC18-A22B-4175-82CD-1233F6DEE8FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{827FCC18-A22B-4175-82CD-1233F6DEE8FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{827FCC18-A22B-4175-82CD-1233F6DEE8FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{827FCC18-A22B-4175-82CD-1233F6DEE8FB}.Release|Any CPU.Build.0 = Release|Any CPU
{D651FE09-CF19-472F-819C-47FECD4A697E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{D651FE09-CF19-472F-819C-47FECD4A697E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{D651FE09-CF19-472F-819C-47FECD4A697E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{D651FE09-CF19-472F-819C-47FECD4A697E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{D64C1577-4929-4B60-939E-96DE1534891A} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545}
{F2840BC7-0188-4606-9126-DADD0F5ABF7A} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545}
{BD65D04F-08D5-40C1-8C24-77CA0BACB877} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545}
{78040F9E-3501-4A40-82DF-00A597710F35} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545}
{0CE86223-D31D-4315-A1F5-87BA3EE1B844} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545}
{077AA5F8-8B61-420C-A6B5-0150A66FDB34} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545}
{36E2735F-CEAB-44C8-A6D1-2CDAFF399751} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545}
{C5BB573D-3030-4BCB-88B7-F6A85C32766C} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}
{527F645C-C1FC-406E-8479-81386C8ECF13} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}
{E60895E5-79C4-447D-88B7-85CB5BA336A4} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}
{90CB5DC4-C040-45C7-8900-9688B26405BC} = {CCD2960C-23CC-4AB4-B84D-60C7AAA52F4D}
{827FCC18-A22B-4175-82CD-1233F6DEE8FB} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545}
{D651FE09-CF19-472F-819C-47FECD4A697E} = {649A3FFA-182F-4E56-9717-E6A9A2BEC545}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6AAFA1C6-603E-13FA-45E5-7910AA9F661D}
EndGlobalSection
EndGlobal

23
services/saas/EShopOnAbp.SaasService.sln.DotSettings

@ -1,23 +0,0 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeEditing/Intellisense/CodeCompletion/IntelliSenseCompletingCharacters/CSharpCompletingCharacters/UpgradedFromVSSettings/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceDoWhileStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceFixedStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceForeachStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceForStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceIfStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceLockStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceUsingStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceWhileStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOR/@EntryValue">Required</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOREACH/@EntryValue">Required</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_IFELSE/@EntryValue">Required</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_WHILE/@EntryValue">Required</s:String>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_REDUNDANT/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/Generate/=Implementations/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/Generate/=Implementations/Options/=Async/@EntryIndexedValue">False</s:String>
<s:String x:Key="/Default/CodeStyle/Generate/=Implementations/Options/=Mutable/@EntryIndexedValue">False</s:String>
<s:Boolean x:Key="/Default/CodeStyle/Generate/=Overrides/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/Generate/=Overrides/Options/=Async/@EntryIndexedValue">False</s:String>
<s:String x:Key="/Default/CodeStyle/Generate/=Overrides/Options/=Mutable/@EntryIndexedValue">False</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SQL/@EntryIndexedValue">SQL</s:String>
</wpf:ResourceDictionary>

6
services/saas/NuGet.Config

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="BlazoriseMyGet" value="https://www.myget.org/F/blazorise/api/v3/index.json" />
</packageSources>
</configuration>

15
services/saas/src/EShopOnAbp.SaasService.Application.Contracts/EShopOnAbp.SaasService.Application.Contracts.csproj

@ -1,15 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>EShopOnAbp.SaasService</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.TenantManagement.Application.Contracts" Version="5.0.0-beta.2" />
<ProjectReference Include="..\EShopOnAbp.SaasService.Domain.Shared\EShopOnAbp.SaasService.Domain.Shared.csproj" />
</ItemGroup>
</Project>

14
services/saas/src/EShopOnAbp.SaasService.Application.Contracts/SaasServiceApplicationContractsModule.cs

@ -1,14 +0,0 @@
using Volo.Abp.Modularity;
using Volo.Abp.TenantManagement;
namespace EShopOnAbp.SaasService
{
[DependsOn(
typeof(SaasServiceDomainSharedModule),
typeof(AbpTenantManagementApplicationContractsModule)
)]
public class SaasServiceApplicationContractsModule : AbpModule
{
}
}

7
services/saas/src/EShopOnAbp.SaasService.Application.Contracts/SaasServiceRemoteServiceConsts.cs

@ -1,7 +0,0 @@
namespace EShopOnAbp.SaasService
{
public static class SaasServiceRemoteServiceConsts
{
public const string RemoteServiceName = "SaasService";
}
}

16
services/saas/src/EShopOnAbp.SaasService.Application/EShopOnAbp.SaasService.Application.csproj

@ -1,16 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>EShopOnAbp.SaasService</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.TenantManagement.Application" Version="5.0.0-beta.2" />
<ProjectReference Include="..\EShopOnAbp.SaasService.Application.Contracts\EShopOnAbp.SaasService.Application.Contracts.csproj" />
<ProjectReference Include="..\EShopOnAbp.SaasService.Domain\EShopOnAbp.SaasService.Domain.csproj" />
</ItemGroup>
</Project>

14
services/saas/src/EShopOnAbp.SaasService.Application/SaasServiceApplicationAutoMapperProfile.cs

@ -1,14 +0,0 @@
using AutoMapper;
namespace EShopOnAbp.SaasService
{
public class SaasServiceApplicationAutoMapperProfile : Profile
{
public SaasServiceApplicationAutoMapperProfile()
{
/* You can configure your AutoMapper mapping configuration here.
* Alternatively, you can split your mapping configurations
* into multiple profile classes for a better organization. */
}
}
}

23
services/saas/src/EShopOnAbp.SaasService.Application/SaasServiceApplicationModule.cs

@ -1,23 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
using Volo.Abp.TenantManagement;
namespace EShopOnAbp.SaasService
{
[DependsOn(
typeof(SaasServiceDomainModule),
typeof(AbpTenantManagementApplicationModule)
)]
public class SaasServiceApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<SaasServiceApplicationModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<SaasServiceApplicationModule>(validate: true);
});
}
}
}

49
services/saas/src/EShopOnAbp.SaasService.Application/SaasTenantAppService.cs

@ -1,49 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.MultiTenancy;
using Volo.Abp.ObjectExtending;
using Volo.Abp.TenantManagement;
namespace EShopOnAbp.SaasService
{
[Dependency(ReplaceServices = true)]
public class SaasTenantAppService : TenantAppService, ITenantAppService
{
public SaasTenantAppService(
ITenantRepository tenantRepository,
ITenantManager tenantManager,
IDataSeeder dataSeeder,
IDistributedEventBus distributedEventBus) : base(tenantRepository, tenantManager, dataSeeder, distributedEventBus)
{
}
public override async Task<TenantDto> CreateAsync(TenantCreateDto input)
{
var tenant = await TenantManager.CreateAsync(input.Name);
input.MapExtraPropertiesTo(tenant);
await TenantRepository.InsertAsync(tenant);
await CurrentUnitOfWork.SaveChangesAsync();
await DistributedEventBus.PublishAsync(new TenantCreatedEto
{
Id = tenant.Id,
Name = tenant.Name,
Properties = new Dictionary<string, string>
{
{ "AdminEmail", input.AdminEmailAddress },
{ "AdminPassword", input.AdminPassword }
}
});
return ObjectMapper.Map<Tenant, TenantDto>(tenant);
}
}
}

16
services/saas/src/EShopOnAbp.SaasService.Blazor/EShopOnAbp.SaasService.Blazor.csproj

@ -1,16 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Razor">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.TenantManagement.Blazor" Version="5.0.0-beta.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\EShopOnAbp.SaasService.Application.Contracts\EShopOnAbp.SaasService.Application.Contracts.csproj" />
</ItemGroup>
</Project>

24
services/saas/src/EShopOnAbp.SaasService.Blazor/Menus/SaasServiceMenuContributor.cs

@ -1,24 +0,0 @@
using System.Threading.Tasks;
using Volo.Abp.UI.Navigation;
namespace EShopOnAbp.SaasService.Blazor.Menus
{
public class SaasServiceMenuContributor : IMenuContributor
{
public async Task ConfigureMenuAsync(MenuConfigurationContext context)
{
if (context.Menu.Name == StandardMenus.Main)
{
await ConfigureMainMenuAsync(context);
}
}
private Task ConfigureMainMenuAsync(MenuConfigurationContext context)
{
//Add main menu items.
context.Menu.AddItem(new ApplicationMenuItem(SaasServiceMenus.Prefix, displayName: "SaasService", "/SaasService", icon: "fa fa-globe"));
return Task.CompletedTask;
}
}
}

11
services/saas/src/EShopOnAbp.SaasService.Blazor/Menus/SaasServiceMenus.cs

@ -1,11 +0,0 @@
namespace EShopOnAbp.SaasService.Blazor.Menus
{
public class SaasServiceMenus
{
public const string Prefix = "SaasService";
//Add your menu items here...
//public const string Home = Prefix + ".MyNewMenuItem";
}
}

8
services/saas/src/EShopOnAbp.SaasService.Blazor/Pages/SaasService/Index.razor

@ -1,8 +0,0 @@
@page "/SaasService"
@using Microsoft.Extensions.Localization
@using global::EShopOnAbp.SaasService.Localization
@inject IStringLocalizer<SaasServiceResource> L
@{
}
<h1>SaasService</h1>
<p>@L["SamplePageMessage"]</p>

14
services/saas/src/EShopOnAbp.SaasService.Blazor/SaasServiceBlazorAutoMapperProfile.cs

@ -1,14 +0,0 @@
using AutoMapper;
namespace EShopOnAbp.SaasService.Blazor
{
public class SaasServiceBlazorAutoMapperProfile : Profile
{
public SaasServiceBlazorAutoMapperProfile()
{
/* You can configure your AutoMapper mapping configuration here.
* Alternatively, you can split your mapping configurations
* into multiple profile classes for a better organization. */
}
}
}

37
services/saas/src/EShopOnAbp.SaasService.Blazor/SaasServiceBlazorModule.cs

@ -1,37 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using EShopOnAbp.SaasService.Blazor.Menus;
using Volo.Abp.AspNetCore.Components.Web.Theming.Routing;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
using Volo.Abp.TenantManagement.Blazor;
using Volo.Abp.UI.Navigation;
namespace EShopOnAbp.SaasService.Blazor
{
[DependsOn(
typeof(SaasServiceApplicationContractsModule),
typeof(AbpTenantManagementBlazorModule)
)]
public class SaasServiceBlazorModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<SaasServiceBlazorModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<SaasServiceBlazorAutoMapperProfile>(validate: true);
});
Configure<AbpNavigationOptions>(options =>
{
options.MenuContributors.Add(new SaasServiceMenuContributor());
});
Configure<AbpRouterOptions>(options =>
{
options.AdditionalAssemblies.Add(typeof(SaasServiceBlazorModule).Assembly);
});
}
}
}

5
services/saas/src/EShopOnAbp.SaasService.Blazor/_Imports.razor

@ -1,5 +0,0 @@
@using Microsoft.AspNetCore.Components.Web
@using Volo.Abp.AspNetCore.Components.Web
@using Volo.Abp.BlazoriseUI
@using Blazorise
@using Blazorise.DataGrid

24
services/saas/src/EShopOnAbp.SaasService.Domain.Shared/EShopOnAbp.SaasService.Domain.Shared.csproj

@ -1,24 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>EShopOnAbp.SaasService</RootNamespace>
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.TenantManagement.Domain.Shared" Version="5.0.0-beta.2" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="6.0.0-rc.*" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Localization\SaasService\*.json" />
<Content Remove="Localization\SaasService\*.json" />
</ItemGroup>
</Project>

7
services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/ar.json

@ -1,7 +0,0 @@
{
"culture": "ar",
"texts": {
"ManageYourProfile": "إدارة ملفى",
"SamplePageMessage": "صفحة نموذجية للوحدة النمطية SaasService"
}
}

7
services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/cs.json

@ -1,7 +0,0 @@
{
"culture": "cs",
"texts": {
"ManageYourProfile": "Spravovat profil",
"SamplePageMessage": "Ukázková stránka pro modul SaasService"
}
}

7
services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/de-DE.json

@ -1,7 +0,0 @@
{
"culture": "de-DE",
"texts": {
"ManageYourProfile": "Verwalten Sie Ihr Profil",
"SamplePageMessage": "Eine Beispielseite für das Modul SaasServiceModul"
}
}

7
services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/en-GB.json

@ -1,7 +0,0 @@
{
"culture": "en-GB",
"texts": {
"ManageYourProfile": "Manage your profile",
"SamplePageMessage": "A sample page for the SaasService module"
}
}

7
services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/en.json

@ -1,7 +0,0 @@
{
"culture": "en",
"texts": {
"ManageYourProfile": "Manage your profile",
"SamplePageMessage": "A sample page for the SaasService module"
}
}

7
services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/es.json

@ -1,7 +0,0 @@
{
"culture": "es",
"texts": {
"ManageYourProfile": "Gestiona tu perfil",
"SamplePageMessage": "Una página de ejemplo para el módulo SaasService "
}
}

7
services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/fr.json

@ -1,7 +0,0 @@
{
"culture": "fr",
"texts": {
"ManageYourProfile": "Gérer votre profil",
"SamplePageMessage": "Exemple de page pour le module SaasService"
}
}

7
services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/hu.json

@ -1,7 +0,0 @@
{
"culture": "hu",
"texts": {
"ManageYourProfile": "Kezelje a profilját",
"SamplePageMessage": "Mintaoldal a SaasService modulhoz"
}
}

7
services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/nl.json

@ -1,7 +0,0 @@
{
"culture": "nl",
"texts": {
"ManageYourProfile": "Beheer uw profiel",
"SamplePageMessage": "Een voorbeeldpagina voor de SaasService module"
}
}

6
services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/pl-PL.json

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

6
services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/pt-BR.json

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

6
services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/sl.json

@ -1,6 +0,0 @@
{
"culture": "sl",
"texts": {
"ManageYourProfile": "Upravljajte svojim profilom"
}
}

7
services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/tr.json

@ -1,7 +0,0 @@
{
"culture": "tr",
"texts": {
"ManageYourProfile": "Profil yönetimi",
"SamplePageMessage": "SaasService modulünden örnek bir sayfa"
}
}

6
services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/vi.json

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

7
services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/zh-Hans.json

@ -1,7 +0,0 @@
{
"culture": "zh-Hans",
"texts": {
"ManageYourProfile": "管理个人资料",
"SamplePageMessage": "SaasService模块的示例页面"
}
}

6
services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasService/zh-Hant.json

@ -1,6 +0,0 @@
{
"culture": "zh-Hant",
"texts": {
"ManageYourProfile": "管理個人資料"
}
}

10
services/saas/src/EShopOnAbp.SaasService.Domain.Shared/Localization/SaasServiceResource.cs

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

31
services/saas/src/EShopOnAbp.SaasService.Domain.Shared/SaasServiceDomainSharedModule.cs

@ -1,31 +0,0 @@
using Volo.Abp.Modularity;
using Volo.Abp.Localization;
using EShopOnAbp.SaasService.Localization;
using Volo.Abp.TenantManagement;
using Volo.Abp.Validation.Localization;
using Volo.Abp.VirtualFileSystem;
namespace EShopOnAbp.SaasService
{
[DependsOn(
typeof(AbpTenantManagementDomainSharedModule)
)]
public class SaasServiceDomainSharedModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<SaasServiceDomainSharedModule>();
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Add<SaasServiceResource>("en")
.AddBaseTypes(typeof(AbpValidationResource))
.AddVirtualJson("/Localization/SaasService");
});
}
}
}

7
services/saas/src/EShopOnAbp.SaasService.Domain.Shared/SaasServiceErrorCodes.cs

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

15
services/saas/src/EShopOnAbp.SaasService.Domain/EShopOnAbp.SaasService.Domain.csproj

@ -1,15 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>EShopOnAbp.SaasService</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.TenantManagement.Domain" Version="5.0.0-beta.2" />
<ProjectReference Include="..\EShopOnAbp.SaasService.Domain.Shared\EShopOnAbp.SaasService.Domain.Shared.csproj" />
</ItemGroup>
</Project>

11
services/saas/src/EShopOnAbp.SaasService.Domain/SaasServiceDbProperties.cs

@ -1,11 +0,0 @@
namespace EShopOnAbp.SaasService
{
public static class SaasServiceDbProperties
{
public static string DbTablePrefix { get; set; } = "";
public static string DbSchema { get; set; } = null;
public const string ConnectionStringName = "SaasService";
}
}

14
services/saas/src/EShopOnAbp.SaasService.Domain/SaasServiceDomainModule.cs

@ -1,14 +0,0 @@
using Volo.Abp.Modularity;
using Volo.Abp.TenantManagement;
namespace EShopOnAbp.SaasService
{
[DependsOn(
typeof(AbpTenantManagementDomainModule),
typeof(SaasServiceDomainSharedModule)
)]
public class SaasServiceDomainModule : AbpModule
{
}
}

25
services/saas/src/EShopOnAbp.SaasService.EntityFrameworkCore/EShopOnAbp.SaasService.EntityFrameworkCore.csproj

@ -1,25 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>EShopOnAbp.SaasService</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-rc.*">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="5.0.0-beta.2" />
<PackageReference Include="Volo.Abp.TenantManagement.EntityFrameworkCore" Version="5.0.0-beta.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\EShopOnAbp.SaasService.Domain\EShopOnAbp.SaasService.Domain.csproj" />
</ItemGroup>
</Project>

27
services/saas/src/EShopOnAbp.SaasService.EntityFrameworkCore/EntityFrameworkCore/SaasServiceDbContext.cs

@ -1,27 +0,0 @@
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.TenantManagement;
using Volo.Abp.TenantManagement.EntityFrameworkCore;
namespace EShopOnAbp.SaasService.EntityFrameworkCore
{
[ConnectionStringName(SaasServiceDbProperties.ConnectionStringName)]
public class SaasServiceDbContext : AbpDbContext<SaasServiceDbContext>, ITenantManagementDbContext
{
public DbSet<Tenant> Tenants { get; set; }
public DbSet<TenantConnectionString> TenantConnectionStrings { get; set; }
public SaasServiceDbContext(DbContextOptions<SaasServiceDbContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
builder.ConfigureTenantManagement();
}
}
}

44
services/saas/src/EShopOnAbp.SaasService.EntityFrameworkCore/EntityFrameworkCore/SaasServiceDbContextFactory.cs

@ -1,44 +0,0 @@
using System.IO;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
namespace EShopOnAbp.SaasService.EntityFrameworkCore
{
/* This class is needed for EF Core console commands
* (like Add-Migration and Update-Database commands)
* */
public class SaasServiceDbContextFactory : IDesignTimeDbContextFactory<SaasServiceDbContext>
{
public SaasServiceDbContext CreateDbContext(string[] args)
{
var builder = new DbContextOptionsBuilder<SaasServiceDbContext>()
.UseSqlServer(GetConnectionStringFromConfiguration(), b =>
{
b.MigrationsHistoryTable("__SaasService_Migrations");
});
return new SaasServiceDbContext(builder.Options);
}
private static string GetConnectionStringFromConfiguration()
{
return BuildConfiguration()
.GetConnectionString(SaasServiceDbProperties.ConnectionStringName);
}
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(
Path.Combine(
Directory.GetCurrentDirectory(),
$"..{Path.DirectorySeparatorChar}EShopOnAbp.SaasService.HttpApi.Host"
)
)
.AddJsonFile("appsettings.json", optional: false);
return builder.Build();
}
}
}

39
services/saas/src/EShopOnAbp.SaasService.EntityFrameworkCore/EntityFrameworkCore/SaasServiceEntityFrameworkCoreModule.cs

@ -1,39 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.SqlServer;
using Volo.Abp.Modularity;
using Volo.Abp.TenantManagement;
using Volo.Abp.TenantManagement.EntityFrameworkCore;
namespace EShopOnAbp.SaasService.EntityFrameworkCore
{
[DependsOn(
typeof(SaasServiceDomainModule),
typeof(AbpTenantManagementEntityFrameworkCoreModule),
typeof(AbpEntityFrameworkCoreSqlServerModule)
)]
public class SaasServiceEntityFrameworkCoreModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDbContext<SaasServiceDbContext>(options =>
{
options.ReplaceDbContext<ITenantManagementDbContext>();
/* includeAllEntities: true allows to use IRepository<TEntity, TKey> also for non aggregate root entities */
options.AddDefaultRepositories(includeAllEntities: true);
});
Configure<AbpDbContextOptions>(options =>
{
options.Configure<SaasServiceDbContext>(c =>
{
c.UseSqlServer(b =>
{
b.MigrationsHistoryTable("__SaasService_Migrations");
});
});
});
}
}
}

121
services/saas/src/EShopOnAbp.SaasService.EntityFrameworkCore/Migrations/20211006102216_Initial.Designer.cs

@ -1,121 +0,0 @@
// <auto-generated />
using System;
using EShopOnAbp.SaasService.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace EShopOnAbp.SaasService.Migrations
{
[DbContext(typeof(SaasServiceDbContext))]
[Migration("20211006102216_Initial")]
partial class Initial
{
protected override void BuildTargetModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
.HasAnnotation("ProductVersion", "6.0.0-rc.1.21452.10")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.HasKey("Id");
b.HasIndex("Name");
b.ToTable("AbpTenants", (string)null);
});
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b =>
{
b.Property<Guid>("TenantId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("nvarchar(1024)");
b.HasKey("TenantId", "Name");
b.ToTable("AbpTenantConnectionStrings", (string)null);
});
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b =>
{
b.HasOne("Volo.Abp.TenantManagement.Tenant", null)
.WithMany("ConnectionStrings")
.HasForeignKey("TenantId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b =>
{
b.Navigation("ConnectionStrings");
});
#pragma warning restore 612, 618
}
}
}

67
services/saas/src/EShopOnAbp.SaasService.EntityFrameworkCore/Migrations/20211006102216_Initial.cs

@ -1,67 +0,0 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace EShopOnAbp.SaasService.Migrations
{
public partial class Initial : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "AbpTenants",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
ExtraProperties = table.Column<string>(type: "nvarchar(max)", nullable: true),
ConcurrencyStamp = table.Column<string>(type: "nvarchar(40)", maxLength: 40, nullable: true),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
CreatorId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
LastModificationTime = table.Column<DateTime>(type: "datetime2", nullable: true),
LastModifierId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IsDeleted = table.Column<bool>(type: "bit", nullable: false, defaultValue: false),
DeleterId = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
DeletionTime = table.Column<DateTime>(type: "datetime2", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpTenants", x => x.Id);
});
migrationBuilder.CreateTable(
name: "AbpTenantConnectionStrings",
columns: table => new
{
TenantId = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
Name = table.Column<string>(type: "nvarchar(64)", maxLength: 64, nullable: false),
Value = table.Column<string>(type: "nvarchar(1024)", maxLength: 1024, nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_AbpTenantConnectionStrings", x => new { x.TenantId, x.Name });
table.ForeignKey(
name: "FK_AbpTenantConnectionStrings_AbpTenants_TenantId",
column: x => x.TenantId,
principalTable: "AbpTenants",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_AbpTenants_Name",
table: "AbpTenants",
column: "Name");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AbpTenantConnectionStrings");
migrationBuilder.DropTable(
name: "AbpTenants");
}
}
}

119
services/saas/src/EShopOnAbp.SaasService.EntityFrameworkCore/Migrations/SaasServiceDbContextModelSnapshot.cs

@ -1,119 +0,0 @@
// <auto-generated />
using System;
using EShopOnAbp.SaasService.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Metadata;
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
using Volo.Abp.EntityFrameworkCore;
#nullable disable
namespace EShopOnAbp.SaasService.Migrations
{
[DbContext(typeof(SaasServiceDbContext))]
partial class SaasServiceDbContextModelSnapshot : ModelSnapshot
{
protected override void BuildModel(ModelBuilder modelBuilder)
{
#pragma warning disable 612, 618
modelBuilder
.HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
.HasAnnotation("ProductVersion", "6.0.0-rc.1.21452.10")
.HasAnnotation("Relational:MaxIdentifierLength", 128);
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b =>
{
b.Property<Guid>("Id")
.HasColumnType("uniqueidentifier");
b.Property<string>("ConcurrencyStamp")
.IsConcurrencyToken()
.HasMaxLength(40)
.HasColumnType("nvarchar(40)")
.HasColumnName("ConcurrencyStamp");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2")
.HasColumnName("CreationTime");
b.Property<Guid?>("CreatorId")
.HasColumnType("uniqueidentifier")
.HasColumnName("CreatorId");
b.Property<Guid?>("DeleterId")
.HasColumnType("uniqueidentifier")
.HasColumnName("DeleterId");
b.Property<DateTime?>("DeletionTime")
.HasColumnType("datetime2")
.HasColumnName("DeletionTime");
b.Property<string>("ExtraProperties")
.HasColumnType("nvarchar(max)")
.HasColumnName("ExtraProperties");
b.Property<bool>("IsDeleted")
.ValueGeneratedOnAdd()
.HasColumnType("bit")
.HasDefaultValue(false)
.HasColumnName("IsDeleted");
b.Property<DateTime?>("LastModificationTime")
.HasColumnType("datetime2")
.HasColumnName("LastModificationTime");
b.Property<Guid?>("LastModifierId")
.HasColumnType("uniqueidentifier")
.HasColumnName("LastModifierId");
b.Property<string>("Name")
.IsRequired()
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.HasKey("Id");
b.HasIndex("Name");
b.ToTable("AbpTenants", (string)null);
});
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b =>
{
b.Property<Guid>("TenantId")
.HasColumnType("uniqueidentifier");
b.Property<string>("Name")
.HasMaxLength(64)
.HasColumnType("nvarchar(64)");
b.Property<string>("Value")
.IsRequired()
.HasMaxLength(1024)
.HasColumnType("nvarchar(1024)");
b.HasKey("TenantId", "Name");
b.ToTable("AbpTenantConnectionStrings", (string)null);
});
modelBuilder.Entity("Volo.Abp.TenantManagement.TenantConnectionString", b =>
{
b.HasOne("Volo.Abp.TenantManagement.Tenant", null)
.WithMany("ConnectionStrings")
.HasForeignKey("TenantId")
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
});
modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b =>
{
b.Navigation("ConnectionStrings");
});
#pragma warning restore 612, 618
}
}
}

18
services/saas/src/EShopOnAbp.SaasService.HttpApi.Client/EShopOnAbp.SaasService.HttpApi.Client.csproj

@ -1,18 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>EShopOnAbp.SaasService</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.TenantManagement.HttpApi.Client" Version="5.0.0-beta.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\EShopOnAbp.SaasService.Application.Contracts\EShopOnAbp.SaasService.Application.Contracts.csproj" />
</ItemGroup>
</Project>

20
services/saas/src/EShopOnAbp.SaasService.HttpApi.Client/SaasServiceHttpApiClientModule.cs

@ -1,20 +0,0 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Modularity;
using Volo.Abp.TenantManagement;
namespace EShopOnAbp.SaasService
{
[DependsOn(
typeof(SaasServiceApplicationContractsModule),
typeof(AbpTenantManagementHttpApiClientModule))]
public class SaasServiceHttpApiClientModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddHttpClientProxies(
typeof(SaasServiceApplicationContractsModule).Assembly,
SaasServiceRemoteServiceConsts.RemoteServiceName
);
}
}
}

13
services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/Controllers/HomeController.cs

@ -1,13 +0,0 @@
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
namespace EShopOnAbp.SaasService.Controllers
{
public class HomeController : AbpController
{
public ActionResult Index()
{
return Redirect("~/swagger");
}
}
}

27
services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/DbMigrations/SaasServiceDatabaseMigrationChecker.cs

@ -1,27 +0,0 @@
using System;
using EShopOnAbp.SaasService.EntityFrameworkCore;
using EShopOnAbp.Shared.Hosting.Microservices.DbMigrations;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Uow;
namespace EShopOnAbp.SaasService.DbMigrations
{
public class SaasServiceDatabaseMigrationChecker : PendingMigrationsCheckerBase<SaasServiceDbContext>
{
public SaasServiceDatabaseMigrationChecker(
IUnitOfWorkManager unitOfWorkManager,
IServiceProvider serviceProvider,
ICurrentTenant currentTenant,
IDistributedEventBus distributedEventBus)
: base(
unitOfWorkManager,
serviceProvider,
currentTenant,
distributedEventBus,
SaasServiceDbProperties.ConnectionStringName)
{
}
}
}

55
services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/DbMigrations/SaasServiceDatabaseMigrationEventHandler.cs

@ -1,55 +0,0 @@
using System;
using System.Threading.Tasks;
using EShopOnAbp.SaasService.EntityFrameworkCore;
using EShopOnAbp.Shared.Hosting.Microservices.DbMigrations;
using Volo.Abp.Data;
using Volo.Abp.EventBus.Distributed;
using Volo.Abp.MultiTenancy;
using Volo.Abp.TenantManagement;
using Volo.Abp.Uow;
namespace EShopOnAbp.SaasService.DbMigrations
{
public class SaasServiceDatabaseMigrationEventHandler
: DatabaseMigrationEventHandlerBase<SaasServiceDbContext>,
IDistributedEventHandler<ApplyDatabaseMigrationsEto>
{
public SaasServiceDatabaseMigrationEventHandler(
ICurrentTenant currentTenant,
IUnitOfWorkManager unitOfWorkManager,
ITenantStore tenantStore,
ITenantRepository tenantRepository,
IDistributedEventBus distributedEventBus
) : base(
currentTenant,
unitOfWorkManager,
tenantStore,
tenantRepository,
distributedEventBus,
SaasServiceDbProperties.ConnectionStringName)
{
}
public async Task HandleEventAsync(ApplyDatabaseMigrationsEto eventData)
{
if (eventData.DatabaseName != DatabaseName)
{
return;
}
if (eventData.TenantId != null)
{
return;
}
try
{
await MigrateDatabaseSchemaAsync(null);
}
catch (Exception ex)
{
await HandleErrorOnApplyDatabaseMigrationAsync(eventData, ex);
}
}
}
}

52
services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/Dockerfile

@ -1,52 +0,0 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
# It's important to keep lines from here down to "COPY . ." identical in all Dockerfiles
# to take advantage of Docker's build cache, to speed up local container builds
COPY "EShopOnAbp.sln" "EShopOnAbp.sln"
# Applications
COPY "apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbp.AuthServer.csproj" "apps/auth-server/src/EShopOnAbp.AuthServer/EShopOnAbp.AuthServer.csproj"
COPY "apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj" "apps/public-web/src/EShopOnAbp.PublicWeb/EShopOnAbp.PublicWeb.csproj"
# Shared
COPY "shared/EShopOnAbp.Shared.Hosting/EShopOnAbp.Shared.Hosting.csproj" "shared/EShopOnAbp.Shared.Hosting/EShopOnAbp.Shared.Hosting.csproj"
COPY "shared/EShopOnAbp.Shared.Hosting.AspNetCore/EShopOnAbp.Shared.Hosting.AspNetCore.csproj" "shared/EShopOnAbp.Shared.Hosting.AspNetCore/EShopOnAbp.Shared.Hosting.AspNetCore.csproj"
COPY "shared/EShopOnAbp.Shared.Hosting.Gateways/EShopOnAbp.Shared.Hosting.Gateways.csproj" "shared/EShopOnAbp.Shared.Hosting.Gateways/EShopOnAbp.Shared.Hosting.Gateways.csproj"
COPY "shared/EShopOnAbp.Shared.Hosting.Microservices/EShopOnAbp.Shared.Hosting.Microservices.csproj" "shared/EShopOnAbp.Shared.Hosting.Microservices/EShopOnAbp.Shared.Hosting.Microservices.csproj"
COPY "shared/EShopOnAbp.Shared.Localization/EShopOnAbp.Shared.Localization.csproj" "shared/EShopOnAbp.Shared.Localization/EShopOnAbp.Shared.Localization.csproj"
# Microservices
COPY "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/EShopOnAbp.AdministrationService.HttpApi.Host.csproj" "services/administration/src/EShopOnAbp.AdministrationService.HttpApi.Host/EShopOnAbp.AdministrationService.HttpApi.Host.csproj"
COPY "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/EShopOnAbp.IdentityService.HttpApi.Host.csproj" "services/identity/src/EShopOnAbp.IdentityService.HttpApi.Host/EShopOnAbp.IdentityService.HttpApi.Host.csproj"
COPY *"services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/EShopOnAbp.SaasService.HttpApi.Host.csproj" "services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/EShopOnAbp.SaasService.HttpApi.Host.csproj"
COPY *"services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/EShopOnAbp.BasketService.HttpApi.Host.csproj" "services/basket/src/EShopOnAbp.BasketService.HttpApi.Host/EShopOnAbp.BasketService.HttpApi.Host.csproj"
COPY *"services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj" "services/ordering/src/EShopOnAbp.OrderingService.HttpApi.Host/EShopOnAbp.OrderingService.HttpApi.Host.csproj"
COPY *"services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj" "services/catalog/src/EShopOnAbp.CatalogService.HttpApi.Host/EShopOnAbp.CatalogService.HttpApi.Host.csproj"
COPY *"services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj" "services/payment/src/EShopOnAbp.PaymentService.HttpApi.Host/EShopOnAbp.PaymentService.HttpApi.Host.csproj"
# Gateways
COPY "gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbp.WebGateway.csproj" "gateways/web/src/EShopOnAbp.WebGateway/EShopOnAbp.WebGateway.csproj"
COPY "gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbp.WebPublicGateway.csproj" "gateways/web-public/src/EShopOnAbp.WebPublicGateway/EShopOnAbp.WebPublicGateway.csproj"
COPY "NuGet.Config" "NuGet.Config"
RUN dotnet restore "EShopOnAbp.sln"
COPY . .
WORKDIR "/src/services/saas/src/EShopOnAbp.SaasService.HttpApi.Host"
RUN dotnet publish -c Release -o /app
# Should be used after .net6 is out of preview for better performance
# RUN dotnet publish --no-restore -c Release -o /app
FROM build AS publish
FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "EShopOnAbp.SaasService.HttpApi.Host.dll"]

4
services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/Dockerfile.local

@ -1,4 +0,0 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0
COPY bin/Release/net6.0/publish/ app/
WORKDIR /app
ENTRYPOINT ["dotnet", "EShopOnAbp.SaasService.HttpApi.Host.dll"]

30
services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/EShopOnAbp.SaasService.HttpApi.Host.csproj

@ -1,30 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>EShopOnAbp.SaasService</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="6.0.0-rc.*">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\EShopOnAbp.SaasService.HttpApi\EShopOnAbp.SaasService.HttpApi.csproj" />
<ProjectReference Include="..\EShopOnAbp.SaasService.Application\EShopOnAbp.SaasService.Application.csproj" />
<ProjectReference Include="..\EShopOnAbp.SaasService.EntityFrameworkCore\EShopOnAbp.SaasService.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\..\..\..\shared\EShopOnAbp.Shared.Hosting.Microservices\EShopOnAbp.Shared.Hosting.Microservices.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Logs\**" />
<Content Remove="Logs\**" />
<EmbeddedResource Remove="Logs\**" />
<None Remove="Logs\**" />
</ItemGroup>
</Project>

48
services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/Program.cs

@ -1,48 +0,0 @@
using System;
using System.IO;
using System.Threading.Tasks;
using EShopOnAbp.Shared.Hosting.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Hosting;
using Serilog;
using Serilog.Events;
namespace EShopOnAbp.SaasService
{
public class Program
{
public static async Task<int> Main(string[] args)
{
var assemblyName = typeof(Program).Assembly.GetName().Name;
SerilogConfigurationHelper.Configure(assemblyName);
try
{
Log.Information($"Starting {assemblyName}.");
await CreateHostBuilder(args).Build().RunAsync();
return 0;
}
catch (Exception ex)
{
Log.Fatal(ex, $"{assemblyName} terminated unexpectedly!");
return 1;
}
finally
{
Log.CloseAndFlush();
}
}
internal static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureAppConfiguration(build =>
{
build.AddJsonFile("appsettings.secrets.json", optional: true);
})
.ConfigureWebHostDefaults(webBuilder => { webBuilder.UseStartup<Startup>(); })
.UseAutofac()
.UseSerilog();
}
}

27
services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/Properties/launchSettings.json

@ -1,27 +0,0 @@
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "https://localhost:44352",
"sslPort": 44396
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"EShopOnAbp.SaasService.DemoApp": {
"commandName": "Project",
"launchBrowser": true,
"applicationUrl": "https://localhost:44352",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

125
services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/SaasServiceHttpApiHostModule.cs

@ -1,125 +0,0 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using EShopOnAbp.SaasService.DbMigrations;
using Microsoft.AspNetCore.Authentication.JwtBearer;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using EShopOnAbp.SaasService.EntityFrameworkCore;
using EShopOnAbp.Shared.Hosting.AspNetCore;
using EShopOnAbp.Shared.Hosting.Microservices;
using Microsoft.Extensions.Options;
using StackExchange.Redis;
using Microsoft.OpenApi.Models;
using Volo.Abp;
using Volo.Abp.Caching;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Threading;
using Volo.Abp.VirtualFileSystem;
namespace EShopOnAbp.SaasService
{
[DependsOn(
typeof(EShopOnAbpSharedHostingMicroservicesModule),
typeof(SaasServiceEntityFrameworkCoreModule),
typeof(SaasServiceApplicationModule),
typeof(SaasServiceHttpApiModule)
)]
public class SaasServiceHttpApiHostModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var configuration = context.Services.GetConfiguration();
context.Services.AddAbpDbContext<SaasServiceDbContext>();
JwtBearerConfigurationHelper.Configure(context, "SaasService");
// SwaggerConfigurationHelper.Configure(context, "Saas Service API");
SwaggerWithAuthConfigurationHelper.Configure(
context: context,
authority: configuration["AuthServer:Authority"],
scopes: new
Dictionary<string, string> /* Requested scopes for authorization code request and descriptions for swagger UI only */
{
{ "SaasService", "Saas Service API" },
},
apiTitle: "Saas Service API"
);
context.Services.AddCors(options =>
{
options.AddDefaultPolicy(builder =>
{
builder
.WithOrigins(
configuration["App:CorsOrigins"]
.Split(",", StringSplitOptions.RemoveEmptyEntries)
.Select(o => o.Trim().RemovePostFix("/"))
.ToArray()
)
.WithAbpExposedHeaders()
.SetIsOriginAllowedToAllowWildcardSubdomains()
.AllowAnyHeader()
.AllowAnyMethod()
.AllowCredentials();
});
});
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
var env = context.GetEnvironment();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseCorrelationId();
app.UseCors();
app.UseAbpRequestLocalization();
app.UseStaticFiles();
app.UseRouting();
// app.UseHttpMetrics();
app.UseAuthentication();
app.UseAbpClaimsMap();
app.UseMultiTenancy();
app.UseAuthorization();
app.UseSwagger();
app.UseSwaggerUI(options => { options.SwaggerEndpoint("/swagger/v1/swagger.json", "Saas Service API"); });
app.UseAbpSerilogEnrichers();
app.UseAuditing();
app.UseUnitOfWork();
app.UseConfiguredEndpoints(endpoints =>
{
// endpoints.MapMetrics();
});
}
public override void OnPostApplicationInitialization(ApplicationInitializationContext context)
{
using (var scope = context.ServiceProvider.CreateScope())
{
AsyncHelper.RunSync(
() => scope.ServiceProvider
.GetRequiredService<SaasServiceDatabaseMigrationChecker>()
.CheckAsync()
);
}
}
}
public class Test
{
public string ID { get; set; }
public string Name { get; set; }
}
}

21
services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/Startup.cs

@ -1,21 +0,0 @@
using System;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace EShopOnAbp.SaasService
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddApplication<SaasServiceHttpApiHostModule>();
}
public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
{
app.InitializeApplication();
}
}
}

44
services/saas/src/EShopOnAbp.SaasService.HttpApi.Host/appsettings.json

@ -1,44 +0,0 @@
{
"App": {
"SelfUrl": "https://localhost:44352",
"CorsOrigins": "https://localhost:44372,https://localhost:44373"
},
"AuthServer": {
"Authority": "https://localhost:44330",
"RequireHttpsMetadata": "true",
"SwaggerClientId": "SaasService_Swagger",
"SwaggerClientSecret": "1q2w3e*"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*",
"ConnectionStrings": {
"SaasService": "Server=localhost,1434;Database=EShopOnAbp_Saas;User Id=sa;password=myPassw0rd;MultipleActiveResultSets=true",
"AdministrationService": "Server=localhost,1434;Database=EShopOnAbp_Administration;User Id=sa;password=myPassw0rd;MultipleActiveResultSets=true"
},
"StringEncryption": {
"DefaultPassPhrase": "gsKnGZ041HLL4IM8"
},
"Redis": {
"Configuration": "localhost:6379"
},
"RabbitMQ": {
"Connections": {
"Default": {
"HostName": "localhost"
}
},
"EventBus": {
"ClientName": "EShopOnAbp_SaasService",
"ExchangeName": "EShopOnAbp"
}
},
"ElasticSearch": {
"Url": "http://localhost:9200"
}
}

18
services/saas/src/EShopOnAbp.SaasService.HttpApi/EShopOnAbp.SaasService.HttpApi.csproj

@ -1,18 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\..\common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>EShopOnAbp.SaasService</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.TenantManagement.HttpApi" Version="5.0.0-beta.2" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\EShopOnAbp.SaasService.Application.Contracts\EShopOnAbp.SaasService.Application.Contracts.csproj" />
</ItemGroup>
</Project>

13
services/saas/src/EShopOnAbp.SaasService.HttpApi/SaasServiceHttpApiModule.cs

@ -1,13 +0,0 @@
using Volo.Abp.Modularity;
using Volo.Abp.TenantManagement;
namespace EShopOnAbp.SaasService
{
[DependsOn(
typeof(SaasServiceApplicationContractsModule),
typeof(AbpTenantManagementHttpApiModule)
)]
public class SaasServiceHttpApiModule : AbpModule
{
}
}

14
services/saas/test/EShopOnAbp.SaasService.Application.Tests/EShopOnAbp.SaasService.Application.Tests.csproj

@ -1,14 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>EShopOnAbp.SaasService</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\EShopOnAbp.SaasService.Application\EShopOnAbp.SaasService.Application.csproj" />
<ProjectReference Include="..\EShopOnAbp.SaasService.Domain.Tests\EShopOnAbp.SaasService.Domain.Tests.csproj" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
</ItemGroup>
</Project>

3
services/saas/test/EShopOnAbp.SaasService.Application.Tests/FodyWeavers.xml

@ -1,3 +0,0 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
services/saas/test/EShopOnAbp.SaasService.Application.Tests/FodyWeavers.xsd

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

10
services/saas/test/EShopOnAbp.SaasService.Application.Tests/SaasServiceApplicationTestBase.cs

@ -1,10 +0,0 @@
namespace EShopOnAbp.SaasService
{
/* Inherit from this class for your application layer tests.
* See SampleAppService_Tests for example.
*/
public abstract class SaasServiceApplicationTestBase : SaasServiceTestBase<SaasServiceApplicationTestModule>
{
}
}

13
services/saas/test/EShopOnAbp.SaasService.Application.Tests/SaasServiceApplicationTestModule.cs

@ -1,13 +0,0 @@
using Volo.Abp.Modularity;
namespace EShopOnAbp.SaasService
{
[DependsOn(
typeof(SaasServiceApplicationModule),
typeof(SaasServiceDomainTestModule)
)]
public class SaasServiceApplicationTestModule : AbpModule
{
}
}

13
services/saas/test/EShopOnAbp.SaasService.Domain.Tests/EShopOnAbp.SaasService.Domain.Tests.csproj

@ -1,13 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>EShopOnAbp.SaasService</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
<ProjectReference Include="..\EShopOnAbp.SaasService.EntityFrameworkCore.Tests\EShopOnAbp.SaasService.EntityFrameworkCore.Tests.csproj" />
</ItemGroup>
</Project>

3
services/saas/test/EShopOnAbp.SaasService.Domain.Tests/FodyWeavers.xml

@ -1,3 +0,0 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
services/saas/test/EShopOnAbp.SaasService.Domain.Tests/FodyWeavers.xsd

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

10
services/saas/test/EShopOnAbp.SaasService.Domain.Tests/SaasServiceDomainTestBase.cs

@ -1,10 +0,0 @@
namespace EShopOnAbp.SaasService
{
/* Inherit from this class for your domain layer tests.
* See SampleManager_Tests for example.
*/
public abstract class SaasServiceDomainTestBase : SaasServiceTestBase<SaasServiceDomainTestModule>
{
}
}

17
services/saas/test/EShopOnAbp.SaasService.Domain.Tests/SaasServiceDomainTestModule.cs

@ -1,17 +0,0 @@
using EShopOnAbp.SaasService.EntityFrameworkCore;
using Volo.Abp.Modularity;
namespace EShopOnAbp.SaasService
{
/* Domain tests are configured to use the EF Core provider.
* You can switch to MongoDB, however your domain tests should be
* database independent anyway.
*/
[DependsOn(
typeof(SaasServiceEntityFrameworkCoreTestModule)
)]
public class SaasServiceDomainTestModule : AbpModule
{
}
}

21
services/saas/test/EShopOnAbp.SaasService.Domain.Tests/Samples/SampleManager_Tests.cs

@ -1,21 +0,0 @@
using System.Threading.Tasks;
using Xunit;
namespace EShopOnAbp.SaasService.Samples
{
public class SampleManager_Tests : SaasServiceDomainTestBase
{
//private readonly SampleManager _sampleManager;
public SampleManager_Tests()
{
//_sampleManager = GetRequiredService<SampleManager>();
}
[Fact]
public async Task Method1Async()
{
}
}
}

16
services/saas/test/EShopOnAbp.SaasService.EntityFrameworkCore.Tests/EShopOnAbp.SaasService.EntityFrameworkCore.Tests.csproj

@ -1,16 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>EShopOnAbp.SaasService</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Proxies" Version="6.0.0-rc.1.21452.15" />
<ProjectReference Include="..\..\src\EShopOnAbp.SaasService.EntityFrameworkCore\EShopOnAbp.SaasService.EntityFrameworkCore.csproj" />
<ProjectReference Include="..\EShopOnAbp.SaasService.TestBase\EShopOnAbp.SaasService.TestBase.csproj" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.Sqlite" Version="5.0.0-beta.2" />
</ItemGroup>
</Project>

10
services/saas/test/EShopOnAbp.SaasService.EntityFrameworkCore.Tests/EntityFrameworkCore/SaasServiceEntityFrameworkCoreTestBase.cs

@ -1,10 +0,0 @@
namespace EShopOnAbp.SaasService.EntityFrameworkCore
{
/* This class can be used as a base class for EF Core integration tests,
* while SampleRepository_Tests uses a different approach.
*/
public abstract class SaasServiceEntityFrameworkCoreTestBase : SaasServiceTestBase<SaasServiceEntityFrameworkCoreTestModule>
{
}
}

43
services/saas/test/EShopOnAbp.SaasService.EntityFrameworkCore.Tests/EntityFrameworkCore/SaasServiceEntityFrameworkCoreTestModule.cs

@ -1,43 +0,0 @@
using Microsoft.Data.Sqlite;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Storage;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.Sqlite;
using Volo.Abp.Modularity;
namespace EShopOnAbp.SaasService.EntityFrameworkCore
{
[DependsOn(
typeof(SaasServiceTestBaseModule),
typeof(SaasServiceEntityFrameworkCoreModule),
typeof(AbpEntityFrameworkCoreSqliteModule)
)]
public class SaasServiceEntityFrameworkCoreTestModule : 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 SaasServiceDbContext(
new DbContextOptionsBuilder<SaasServiceDbContext>().UseSqlite(connection).Options
).GetService<IRelationalDatabaseCreator>().CreateTables();
return connection;
}
}
}

3
services/saas/test/EShopOnAbp.SaasService.EntityFrameworkCore.Tests/FodyWeavers.xml

@ -1,3 +0,0 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
services/saas/test/EShopOnAbp.SaasService.EntityFrameworkCore.Tests/FodyWeavers.xsd

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

156
services/saas/test/EShopOnAbp.SaasService.HttpApi.Client.ConsoleTestApp/ClientDemoService.cs

@ -1,156 +0,0 @@
using System;
using System.Net.Http;
using System.Threading.Tasks;
using IdentityModel.Client;
using Microsoft.Extensions.Configuration;
using EShopOnAbp.SaasService.Samples;
using Volo.Abp.DependencyInjection;
using Volo.Abp.IdentityModel;
namespace EShopOnAbp.SaasService
{
public class ClientDemoService : ITransientDependency
{
private readonly ISampleAppService _sampleAppService;
private readonly IIdentityModelAuthenticationService _authenticationService;
private readonly IConfiguration _configuration;
public ClientDemoService(
ISampleAppService sampleAppService,
IIdentityModelAuthenticationService authenticationService,
IConfiguration configuration)
{
_sampleAppService = sampleAppService;
_authenticationService = authenticationService;
_configuration = configuration;
}
public async Task RunAsync()
{
await TestWithDynamicProxiesAsync();
await TestWithHttpClientAndIdentityModelAuthenticationServiceAsync();
await TestAllManuallyAsync();
}
/* Shows how to perform an HTTP request to the API using ABP's dynamic c# proxy
* feature. It is just simple as calling a local service method.
* Authorization and HTTP request details are handled by the ABP framework.
*/
private async Task TestWithDynamicProxiesAsync()
{
Console.WriteLine();
Console.WriteLine($"***** {nameof(TestWithDynamicProxiesAsync)} *****");
var result = await _sampleAppService.GetAsync();
Console.WriteLine("Result: " + result.Value);
result = await _sampleAppService.GetAuthorizedAsync();
Console.WriteLine("Result (authorized): " + result.Value);
}
/* Shows how to use HttpClient to perform a request to the HTTP API.
* It uses ABP's IIdentityModelAuthenticationService to simplify obtaining access tokens.
*/
private async Task TestWithHttpClientAndIdentityModelAuthenticationServiceAsync()
{
Console.WriteLine();
Console.WriteLine($"***** {nameof(TestWithHttpClientAndIdentityModelAuthenticationServiceAsync)} *****");
//Get access token using ABP's IIdentityModelAuthenticationService
var accessToken = await _authenticationService.GetAccessTokenAsync(
new IdentityClientConfiguration(
_configuration["IdentityClients:Default:Authority"],
_configuration["IdentityClients:Default:Scope"],
_configuration["IdentityClients:Default:ClientId"],
_configuration["IdentityClients:Default:ClientSecret"],
_configuration["IdentityClients:Default:GrantType"],
_configuration["IdentityClients:Default:UserName"],
_configuration["IdentityClients:Default:UserPassword"]
)
);
//Perform the actual HTTP request
using (var httpClient = new HttpClient())
{
httpClient.SetBearerToken(accessToken);
var url = _configuration["RemoteServices:SaasService:BaseUrl"] +
"api/SaasService/sample/authorized";
var responseMessage = await httpClient.GetAsync(url);
if (responseMessage.IsSuccessStatusCode)
{
var responseString = await responseMessage.Content.ReadAsStringAsync();
Console.WriteLine("Result: " + responseString);
}
else
{
throw new Exception("Remote server returns error code: " + responseMessage.StatusCode);
}
}
}
/* Shows how to use HttpClient to perform a request to the HTTP API.
* It obtains access token using IdentityServer's API. See its documentation:
* https://identityserver4.readthedocs.io/en/latest/quickstarts/2_resource_owner_passwords.html
*/
private async Task TestAllManuallyAsync()
{
Console.WriteLine();
Console.WriteLine($"***** {nameof(TestAllManuallyAsync)} *****");
//Obtain access token from the IDS4 server
// discover endpoints from metadata
var client = new HttpClient();
var disco = await client.GetDiscoveryDocumentAsync(_configuration["IdentityClients:Default:Authority"]);
if (disco.IsError)
{
Console.WriteLine(disco.Error);
return;
}
// request token
var tokenResponse = await client.RequestPasswordTokenAsync(new PasswordTokenRequest
{
Address = disco.TokenEndpoint,
ClientId = _configuration["IdentityClients:Default:ClientId"],
ClientSecret = _configuration["IdentityClients:Default:ClientSecret"],
UserName = _configuration["IdentityClients:Default:UserName"],
Password = _configuration["IdentityClients:Default:UserPassword"],
Scope = _configuration["IdentityClients:Default:Scope"]
});
if (tokenResponse.IsError)
{
Console.WriteLine(tokenResponse.Error);
return;
}
Console.WriteLine(tokenResponse.Json);
//Perform the actual HTTP request
using (var httpClient = new HttpClient())
{
httpClient.SetBearerToken(tokenResponse.AccessToken);
var url = _configuration["RemoteServices:SaasService:BaseUrl"] +
"api/SaasService/sample/authorized";
var responseMessage = await httpClient.GetAsync(url);
if (responseMessage.IsSuccessStatusCode)
{
var responseString = await responseMessage.Content.ReadAsStringAsync();
Console.WriteLine("Result: " + responseString);
}
else
{
throw new Exception("Remote server returns error code: " + responseMessage.StatusCode);
}
}
}
}
}

26
services/saas/test/EShopOnAbp.SaasService.HttpApi.Client.ConsoleTestApp/ConsoleTestAppHostedService.cs

@ -1,26 +0,0 @@
using Microsoft.Extensions.Hosting;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp;
namespace EShopOnAbp.SaasService.HttpApi.Client.ConsoleTestApp
{
public class ConsoleTestAppHostedService : IHostedService
{
public async Task StartAsync(CancellationToken cancellationToken)
{
using (var application = AbpApplicationFactory.Create<SaasServiceConsoleApiClientModule>())
{
application.Initialize();
var demo = application.ServiceProvider.GetRequiredService<ClientDemoService>();
await demo.RunAsync();
application.Shutdown();
}
}
public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
}
}

26
services/saas/test/EShopOnAbp.SaasService.HttpApi.Client.ConsoleTestApp/EShopOnAbp.SaasService.HttpApi.Client.ConsoleTestApp.csproj

@ -1,26 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>EShopOnAbp.SaasService</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Http.Client.IdentityModel" Version="5.0.0-beta.2" />
<ProjectReference Include="..\..\src\EShopOnAbp.SaasService.HttpApi.Client\EShopOnAbp.SaasService.HttpApi.Client.csproj" />
</ItemGroup>
<ItemGroup>
<None Remove="appsettings.json" />
<Content Include="appsettings.json">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.0-rc.1.21452.15" />
</ItemGroup>
</Project>

21
services/saas/test/EShopOnAbp.SaasService.HttpApi.Client.ConsoleTestApp/Program.cs

@ -1,21 +0,0 @@
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace EShopOnAbp.SaasService.HttpApi.Client.ConsoleTestApp
{
class Program
{
static async Task Main(string[] args)
{
await CreateHostBuilder(args).RunConsoleAsync();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureServices((hostContext, services) =>
{
services.AddHostedService<ConsoleTestAppHostedService>();
});
}
}

14
services/saas/test/EShopOnAbp.SaasService.HttpApi.Client.ConsoleTestApp/SaasServiceConsoleApiClientModule.cs

@ -1,14 +0,0 @@
using Volo.Abp.Http.Client.IdentityModel;
using Volo.Abp.Modularity;
namespace EShopOnAbp.SaasService
{
[DependsOn(
typeof(SaasServiceHttpApiClientModule),
typeof(AbpHttpClientIdentityModelModule)
)]
public class SaasServiceConsoleApiClientModule : AbpModule
{
}
}

21
services/saas/test/EShopOnAbp.SaasService.HttpApi.Client.ConsoleTestApp/appsettings.json

@ -1,21 +0,0 @@
{
"RemoteServices": {
"Default": {
"BaseUrl": "https://localhost:44348/"
},
"SaasService": {
"BaseUrl": "https://localhost:44396/"
}
},
"IdentityClients": {
"Default": {
"GrantType": "password",
"ClientId": "SaasService_App",
"ClientSecret": "1q2w3e*",
"UserName": "admin",
"UserPassword": "1q2w3E*",
"Authority": "https://localhost:44348/",
"Scope": "SaasService"
}
}
}

17
services/saas/test/EShopOnAbp.SaasService.MongoDB.Tests/EShopOnAbp.SaasService.MongoDB.Tests.csproj

@ -1,17 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>EShopOnAbp.SaasService</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
<PackageReference Include="Mongo2Go" Version="3.1.1" />
<ProjectReference Include="..\..\src\EShopOnAbp.SaasService.MongoDB\EShopOnAbp.SaasService.MongoDB.csproj" />
<ProjectReference Include="..\EShopOnAbp.SaasService.TestBase\EShopOnAbp.SaasService.TestBase.csproj" />
</ItemGroup>
</Project>

3
services/saas/test/EShopOnAbp.SaasService.MongoDB.Tests/FodyWeavers.xml

@ -1,3 +0,0 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
services/saas/test/EShopOnAbp.SaasService.MongoDB.Tests/FodyWeavers.xsd

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

22
services/saas/test/EShopOnAbp.SaasService.MongoDB.Tests/MongoDB/MongoDbFixture.cs

@ -1,22 +0,0 @@
using System;
using Mongo2Go;
namespace EShopOnAbp.SaasService.MongoDB
{
public class MongoDbFixture : IDisposable
{
private static readonly MongoDbRunner MongoDbRunner;
public static readonly string ConnectionString;
static MongoDbFixture()
{
MongoDbRunner = MongoDbRunner.Start(singleNodeReplSet: true, singleNodeReplSetWaitTimeout: 20);
ConnectionString = MongoDbRunner.ConnectionString;
}
public void Dispose()
{
MongoDbRunner?.Dispose();
}
}
}

10
services/saas/test/EShopOnAbp.SaasService.MongoDB.Tests/MongoDB/MongoTestCollection.cs

@ -1,10 +0,0 @@
using Xunit;
namespace EShopOnAbp.SaasService.MongoDB
{
[CollectionDefinition(Name)]
public class MongoTestCollection : ICollectionFixture<MongoDbFixture>
{
public const string Name = "MongoDB Collection";
}
}

10
services/saas/test/EShopOnAbp.SaasService.MongoDB.Tests/MongoDB/SaasServiceMongoDbTestBase.cs

@ -1,10 +0,0 @@
namespace EShopOnAbp.SaasService.MongoDB
{
/* This class can be used as a base class for MongoDB integration tests,
* while SampleRepository_Tests uses a different approach.
*/
public abstract class SaasServiceMongoDbTestBase : SaasServiceTestBase<SaasServiceMongoDbTestModule>
{
}
}

27
services/saas/test/EShopOnAbp.SaasService.MongoDB.Tests/MongoDB/SaasServiceMongoDbTestModule.cs

@ -1,27 +0,0 @@
using System;
using Volo.Abp.Data;
using Volo.Abp.Modularity;
using Volo.Abp.Uow;
namespace EShopOnAbp.SaasService.MongoDB
{
[DependsOn(
typeof(SaasServiceTestBaseModule),
typeof(SaasServiceMongoDbModule)
)]
public class SaasServiceMongoDbTestModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
var stringArray = MongoDbFixture.ConnectionString.Split('?');
var connectionString = stringArray[0].EnsureEndsWith('/') +
"Db_" +
Guid.NewGuid().ToString("N") + "/?" + stringArray[1];
Configure<AbpDbConnectionOptions>(options =>
{
options.ConnectionStrings.Default = connectionString;
});
}
}
}

14
services/saas/test/EShopOnAbp.SaasService.MongoDB.Tests/MongoDB/Samples/SampleRepository_Tests.cs

@ -1,14 +0,0 @@
using EShopOnAbp.SaasService.Samples;
using Xunit;
namespace EShopOnAbp.SaasService.MongoDB.Samples
{
[Collection(MongoTestCollection.Name)]
public class SampleRepository_Tests : SampleRepository_Tests<SaasServiceMongoDbTestModule>
{
/* Don't write custom repository tests here, instead write to
* the base class.
* One exception can be some specific tests related to MongoDB.
*/
}
}

21
services/saas/test/EShopOnAbp.SaasService.TestBase/EShopOnAbp.SaasService.TestBase.csproj

@ -1,21 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<RootNamespace>EShopOnAbp.SaasService</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.9.1" />
<PackageReference Include="NSubstitute" Version="4.2.2" />
<PackageReference Include="Shouldly" Version="4.0.3" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.extensibility.execution" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.3" />
<PackageReference Include="Volo.Abp.Autofac" Version="5.0.0-beta.2" />
<PackageReference Include="Volo.Abp.Authorization" Version="5.0.0-beta.2" />
<PackageReference Include="Volo.Abp.TestBase" Version="5.0.0-beta.2" />
<ProjectReference Include="..\..\src\EShopOnAbp.SaasService.Domain\EShopOnAbp.SaasService.Domain.csproj" />
</ItemGroup>
</Project>

3
services/saas/test/EShopOnAbp.SaasService.TestBase/FodyWeavers.xml

@ -1,3 +0,0 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait ContinueOnCapturedContext="false" />
</Weavers>

30
services/saas/test/EShopOnAbp.SaasService.TestBase/FodyWeavers.xsd

@ -1,30 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

33
services/saas/test/EShopOnAbp.SaasService.TestBase/SaasServiceDataSeedContributor.cs

@ -1,33 +0,0 @@
using System.Threading.Tasks;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Guids;
using Volo.Abp.MultiTenancy;
namespace EShopOnAbp.SaasService
{
public class SaasServiceDataSeedContributor : IDataSeedContributor, ITransientDependency
{
private readonly IGuidGenerator _guidGenerator;
private readonly ICurrentTenant _currentTenant;
public SaasServiceDataSeedContributor(
IGuidGenerator guidGenerator, ICurrentTenant currentTenant)
{
_guidGenerator = guidGenerator;
_currentTenant = currentTenant;
}
public Task SeedAsync(DataSeedContext context)
{
/* Instead of returning the Task.CompletedTask, you can insert your test data
* at this point!
*/
using (_currentTenant.Change(context?.TenantId))
{
return Task.CompletedTask;
}
}
}
}

60
services/saas/test/EShopOnAbp.SaasService.TestBase/SaasServiceTestBase.cs

@ -1,60 +0,0 @@
using System;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp;
using Volo.Abp.Modularity;
using Volo.Abp.Uow;
using Volo.Abp.Testing;
namespace EShopOnAbp.SaasService
{
/* All test classes are derived from this class, directly or indirectly. */
public abstract class SaasServiceTestBase<TStartupModule> : AbpIntegratedTest<TStartupModule>
where TStartupModule : IAbpModule
{
protected override void SetAbpApplicationCreationOptions(AbpApplicationCreationOptions options)
{
options.UseAutofac();
}
protected virtual Task WithUnitOfWorkAsync(Func<Task> func)
{
return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func);
}
protected virtual async Task WithUnitOfWorkAsync(AbpUnitOfWorkOptions options, Func<Task> action)
{
using (var scope = ServiceProvider.CreateScope())
{
var uowManager = scope.ServiceProvider.GetRequiredService<IUnitOfWorkManager>();
using (var uow = uowManager.Begin(options))
{
await action();
await uow.CompleteAsync();
}
}
}
protected virtual Task<TResult> WithUnitOfWorkAsync<TResult>(Func<Task<TResult>> func)
{
return WithUnitOfWorkAsync(new AbpUnitOfWorkOptions(), func);
}
protected virtual async Task<TResult> WithUnitOfWorkAsync<TResult>(AbpUnitOfWorkOptions options, Func<Task<TResult>> func)
{
using (var scope = ServiceProvider.CreateScope())
{
var uowManager = scope.ServiceProvider.GetRequiredService<IUnitOfWorkManager>();
using (var uow = uowManager.Begin(options))
{
var result = await func();
await uow.CompleteAsync();
return result;
}
}
}
}
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save