Browse Source

Initial commit (project created)

pull/15/head
Halil İbrahim Kalkan 6 years ago
parent
commit
c3afa0bcfa
  1. 1
      event-organizer/.gitattributes
  2. 260
      event-organizer/.gitignore
  3. 5
      event-organizer/.prettierrc
  4. 137
      event-organizer/EventHub.sln
  5. 23
      event-organizer/EventHub.sln.DotSettings
  6. 6
      event-organizer/NuGet.Config
  7. 8
      event-organizer/common.props
  8. 23
      event-organizer/src/EventHub.Application.Contracts/EventHub.Application.Contracts.csproj
  9. 27
      event-organizer/src/EventHub.Application.Contracts/EventHubApplicationContractsModule.cs
  10. 29
      event-organizer/src/EventHub.Application.Contracts/EventHubDtoExtensions.cs
  11. 22
      event-organizer/src/EventHub.Application.Contracts/Permissions/EventHubPermissionDefinitionProvider.cs
  12. 10
      event-organizer/src/EventHub.Application.Contracts/Permissions/EventHubPermissions.cs
  13. 23
      event-organizer/src/EventHub.Application/EventHub.Application.csproj
  14. 18
      event-organizer/src/EventHub.Application/EventHubAppService.cs
  15. 14
      event-organizer/src/EventHub.Application/EventHubApplicationAutoMapperProfile.cs
  16. 30
      event-organizer/src/EventHub.Application/EventHubApplicationModule.cs
  17. 2
      event-organizer/src/EventHub.Application/Properties/AssemblyInfo.cs
  18. 43
      event-organizer/src/EventHub.DbMigrator/DbMigratorHostedService.cs
  19. 35
      event-organizer/src/EventHub.DbMigrator/EventHub.DbMigrator.csproj
  20. 20
      event-organizer/src/EventHub.DbMigrator/EventHubDbMigratorModule.cs
  21. 40
      event-organizer/src/EventHub.DbMigrator/Program.cs
  22. 24
      event-organizer/src/EventHub.DbMigrator/appsettings.json
  23. 31
      event-organizer/src/EventHub.Domain.Shared/EventHub.Domain.Shared.csproj
  24. 7
      event-organizer/src/EventHub.Domain.Shared/EventHubDomainErrorCodes.cs
  25. 59
      event-organizer/src/EventHub.Domain.Shared/EventHubDomainSharedModule.cs
  26. 23
      event-organizer/src/EventHub.Domain.Shared/EventHubGlobalFeatureConfigurator.cs
  27. 72
      event-organizer/src/EventHub.Domain.Shared/EventHubModuleExtensionConfigurator.cs
  28. 8
      event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/ar.json
  29. 8
      event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/cs.json
  30. 8
      event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/de-DE.json
  31. 8
      event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/en-GB.json
  32. 8
      event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/en.json
  33. 8
      event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/es.json
  34. 8
      event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/fr.json
  35. 8
      event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/hu.json
  36. 8
      event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/nl.json
  37. 8
      event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/pl-PL.json
  38. 8
      event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/pt-BR.json
  39. 8
      event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/ru.json
  40. 8
      event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/sl.json
  41. 8
      event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/tr.json
  42. 8
      event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/vi.json
  43. 8
      event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/zh-Hans.json
  44. 8
      event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/zh-Hant.json
  45. 10
      event-organizer/src/EventHub.Domain.Shared/Localization/EventHubResource.cs
  46. 11
      event-organizer/src/EventHub.Domain.Shared/MultiTenancy/MultiTenancyConsts.cs
  47. 182
      event-organizer/src/EventHub.Domain/Data/EventHubDbMigrationService.cs
  48. 9
      event-organizer/src/EventHub.Domain/Data/IEventHubDbSchemaMigrator.cs
  49. 16
      event-organizer/src/EventHub.Domain/Data/NullEventHubDbSchemaMigrator.cs
  50. 27
      event-organizer/src/EventHub.Domain/EventHub.Domain.csproj
  51. 9
      event-organizer/src/EventHub.Domain/EventHubConsts.cs
  52. 46
      event-organizer/src/EventHub.Domain/EventHubDomainModule.cs
  53. 324
      event-organizer/src/EventHub.Domain/IdentityServer/IdentityServerDataSeedContributor.cs
  54. 3
      event-organizer/src/EventHub.Domain/Properties/AssemblyInfo.cs
  55. 13
      event-organizer/src/EventHub.Domain/Settings/EventHubSettingDefinitionProvider.cs
  56. 10
      event-organizer/src/EventHub.Domain/Settings/EventHubSettings.cs
  57. 63
      event-organizer/src/EventHub.Domain/Users/AppUser.cs
  58. 35
      event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EntityFrameworkCoreEventHubDbSchemaMigrator.cs
  59. 16
      event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubEntityFrameworkCoreDbMigrationsModule.cs
  60. 48
      event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubMigrationsDbContext.cs
  61. 33
      event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubMigrationsDbContextFactory.cs
  62. 18
      event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EventHub.EntityFrameworkCore.DbMigrations.csproj
  63. 2307
      event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20201028014149_Initial.Designer.cs
  64. 1362
      event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20201028014149_Initial.cs
  65. 2305
      event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/EventHubMigrationsDbContextModelSnapshot.cs
  66. 58
      event-organizer/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubDbContext.cs
  67. 22
      event-organizer/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubDbContextModelCreatingExtensions.cs
  68. 45
      event-organizer/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubEfCoreEntityExtensionMappings.cs
  69. 52
      event-organizer/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubEntityFrameworkCoreModule.cs
  70. 23
      event-organizer/src/EventHub.EntityFrameworkCore/EventHub.EntityFrameworkCore.csproj
  71. 2
      event-organizer/src/EventHub.EntityFrameworkCore/Properties/AssemblyInfo.cs
  72. 22
      event-organizer/src/EventHub.HttpApi.Client/EventHub.HttpApi.Client.csproj
  73. 31
      event-organizer/src/EventHub.HttpApi.Client/EventHubHttpApiClientModule.cs
  74. 15
      event-organizer/src/EventHub.HttpApi/Controllers/EventHubController.cs
  75. 22
      event-organizer/src/EventHub.HttpApi/EventHub.HttpApi.csproj
  76. 40
      event-organizer/src/EventHub.HttpApi/EventHubHttpApiModule.cs
  77. 11
      event-organizer/src/EventHub.HttpApi/Models/Test/TestModel.cs
  78. 4
      event-organizer/src/EventHub.Web/Components/_ViewImports.cshtml
  79. 55
      event-organizer/src/EventHub.Web/EventHub.Web.csproj
  80. 11
      event-organizer/src/EventHub.Web/EventHubBrandingProvider.cs
  81. 12
      event-organizer/src/EventHub.Web/EventHubWebAutoMapperProfile.cs
  82. 233
      event-organizer/src/EventHub.Web/EventHubWebModule.cs
  83. 34
      event-organizer/src/EventHub.Web/Menus/EventHubMenuContributor.cs
  84. 11
      event-organizer/src/EventHub.Web/Menus/EventHubMenus.cs
  85. 15
      event-organizer/src/EventHub.Web/Pages/EventHubPageModel.cs
  86. 167
      event-organizer/src/EventHub.Web/Pages/Index.cshtml
  87. 10
      event-organizer/src/EventHub.Web/Pages/Index.cshtml.cs
  88. 3
      event-organizer/src/EventHub.Web/Pages/Index.css
  89. 3
      event-organizer/src/EventHub.Web/Pages/Index.js
  90. 4
      event-organizer/src/EventHub.Web/Pages/_ViewImports.cshtml
  91. 54
      event-organizer/src/EventHub.Web/Program.cs
  92. 2
      event-organizer/src/EventHub.Web/Properties/AssemblyInfo.cs
  93. 27
      event-organizer/src/EventHub.Web/Properties/launchSettings.json
  94. 18
      event-organizer/src/EventHub.Web/Startup.cs
  95. 4
      event-organizer/src/EventHub.Web/Views/_ViewImports.cshtml
  96. 8
      event-organizer/src/EventHub.Web/abp.resourcemapping.js
  97. 2
      event-organizer/src/EventHub.Web/appsettings.Development.json
  98. 26
      event-organizer/src/EventHub.Web/appsettings.json
  99. 9
      event-organizer/src/EventHub.Web/gulpfile.js
  100. 8
      event-organizer/src/EventHub.Web/package.json

1
event-organizer/.gitattributes

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

260
event-organizer/.gitignore

@ -0,0 +1,260 @@
## 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
# EventHub
src/EventHub.Web/Logs/*
src/EventHub.Web.Host/Logs/*
src/EventHub.IdentityServer/Logs/*
src/EventHub.HttpApi.Host/Logs/*
src/EventHub.HttpApi.HostWithIds/Logs/*
src/EventHub.DbMigrator/Logs/*

5
event-organizer/.prettierrc

@ -0,0 +1,5 @@
{
"singleQuote": true,
"useTabs": false,
"tabWidth": 4
}

137
event-organizer/EventHub.sln

@ -0,0 +1,137 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29020.237
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.Domain", "src\EventHub.Domain\EventHub.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.Application", "src\EventHub.Application\EventHub.Application.csproj", "{1A94A50E-06DC-43C1-80B5-B662820EC3EB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.EntityFrameworkCore", "src\EventHub.EntityFrameworkCore\EventHub.EntityFrameworkCore.csproj", "{C956DD76-69C8-4A9C-83EA-D17DF83340FD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.Web", "src\EventHub.Web\EventHub.Web.csproj", "{068855E8-9240-4F1A-910B-CF825794513B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CA9AC87F-097E-4F15-8393-4BC07735A5B0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{04DBDB01-70F4-4E06-B468-8F87850B22BE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.Application.Tests", "test\EventHub.Application.Tests\EventHub.Application.Tests.csproj", "{50B2631D-129C-47B3-A587-029CCD6099BC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.Web.Tests", "test\EventHub.Web.Tests\EventHub.Web.Tests.csproj", "{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.EntityFrameworkCore.DbMigrations", "src\EventHub.EntityFrameworkCore.DbMigrations\EventHub.EntityFrameworkCore.DbMigrations.csproj", "{0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.Domain.Shared", "src\EventHub.Domain.Shared\EventHub.Domain.Shared.csproj", "{42F719ED-8413-4895-B5B4-5AB56079BC66}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.Application.Contracts", "src\EventHub.Application.Contracts\EventHub.Application.Contracts.csproj", "{520659C8-C734-4298-A3DA-B539DB9DFC0B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.HttpApi", "src\EventHub.HttpApi\EventHub.HttpApi.csproj", "{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.HttpApi.Client", "src\EventHub.HttpApi.Client\EventHub.HttpApi.Client.csproj", "{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.EntityFrameworkCore.Tests", "test\EventHub.EntityFrameworkCore.Tests\EventHub.EntityFrameworkCore.Tests.csproj", "{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.TestBase", "test\EventHub.TestBase\EventHub.TestBase.csproj", "{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.Domain.Tests", "test\EventHub.Domain.Tests\EventHub.Domain.Tests.csproj", "{E512F4D9-9375-480F-A2F6-A46509F9D824}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.HttpApi.Client.ConsoleTestApp", "test\EventHub.HttpApi.Client.ConsoleTestApp\EventHub.HttpApi.Client.ConsoleTestApp.csproj", "{EF480016-9127-4916-8735-D2466BDBC582}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "EventHub.DbMigrator", "src\EventHub.DbMigrator\EventHub.DbMigrator.csproj", "{AA94D832-1CCC-4715-95A9-A483F23A1A5D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.Build.0 = Release|Any CPU
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.Build.0 = Release|Any CPU
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.Build.0 = Release|Any CPU
{068855E8-9240-4F1A-910B-CF825794513B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{068855E8-9240-4F1A-910B-CF825794513B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{068855E8-9240-4F1A-910B-CF825794513B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{068855E8-9240-4F1A-910B-CF825794513B}.Release|Any CPU.Build.0 = Release|Any CPU
{50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.Build.0 = Release|Any CPU
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Release|Any CPU.Build.0 = Release|Any CPU
{0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Release|Any CPU.Build.0 = Release|Any CPU
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.ActiveCfg = Release|Any CPU
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.Build.0 = Release|Any CPU
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.Build.0 = Release|Any CPU
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.Build.0 = Release|Any CPU
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.Build.0 = Release|Any CPU
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.Build.0 = Release|Any CPU
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.Build.0 = Release|Any CPU
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.Build.0 = Release|Any CPU
{EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.Build.0 = Release|Any CPU
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{1A94A50E-06DC-43C1-80B5-B662820EC3EB} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{C956DD76-69C8-4A9C-83EA-D17DF83340FD} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{068855E8-9240-4F1A-910B-CF825794513B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{50B2631D-129C-47B3-A587-029CCD6099BC} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{42F719ED-8413-4895-B5B4-5AB56079BC66} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{520659C8-C734-4298-A3DA-B539DB9DFC0B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{E512F4D9-9375-480F-A2F6-A46509F9D824} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{EF480016-9127-4916-8735-D2466BDBC582} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{AA94D832-1CCC-4715-95A9-A483F23A1A5D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {6AAFA1C6-603E-13FA-45E5-7910AA9F661D}
EndGlobalSection
EndGlobal

23
event-organizer/EventHub.sln.DotSettings

@ -0,0 +1,23 @@
<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
event-organizer/NuGet.Config

@ -0,0 +1,6 @@
<?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>

8
event-organizer/common.props

@ -0,0 +1,8 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>1.0.0</Version>
<NoWarn>$(NoWarn);CS1591;CS0436</NoWarn>
<AbpProjectType>app</AbpProjectType>
</PropertyGroup>
</Project>

23
event-organizer/src/EventHub.Application.Contracts/EventHub.Application.Contracts.csproj

@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>EventHub</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\EventHub.Domain.Shared\EventHub.Domain.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.ObjectExtending" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.Account.Application.Contracts" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.Identity.Application.Contracts" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application.Contracts" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.TenantManagement.Application.Contracts" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.FeatureManagement.Application.Contracts" Version="4.2.0-rc.1" />
</ItemGroup>
</Project>

27
event-organizer/src/EventHub.Application.Contracts/EventHubApplicationContractsModule.cs

@ -0,0 +1,27 @@
using Volo.Abp.Account;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.Modularity;
using Volo.Abp.ObjectExtending;
using Volo.Abp.PermissionManagement;
using Volo.Abp.TenantManagement;
namespace EventHub
{
[DependsOn(
typeof(EventHubDomainSharedModule),
typeof(AbpAccountApplicationContractsModule),
typeof(AbpFeatureManagementApplicationContractsModule),
typeof(AbpIdentityApplicationContractsModule),
typeof(AbpPermissionManagementApplicationContractsModule),
typeof(AbpTenantManagementApplicationContractsModule),
typeof(AbpObjectExtendingModule)
)]
public class EventHubApplicationContractsModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
EventHubDtoExtensions.Configure();
}
}
}

29
event-organizer/src/EventHub.Application.Contracts/EventHubDtoExtensions.cs

@ -0,0 +1,29 @@
using Volo.Abp.Identity;
using Volo.Abp.ObjectExtending;
using Volo.Abp.Threading;
namespace EventHub
{
public static class EventHubDtoExtensions
{
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
public static void Configure()
{
OneTimeRunner.Run(() =>
{
/* You can add extension properties to DTOs
* defined in the depended modules.
*
* Example:
*
* ObjectExtensionManager.Instance
* .AddOrUpdateProperty<IdentityRoleDto, string>("Title");
*
* See the documentation for more:
* https://docs.abp.io/en/abp/latest/Object-Extensions
*/
});
}
}
}

22
event-organizer/src/EventHub.Application.Contracts/Permissions/EventHubPermissionDefinitionProvider.cs

@ -0,0 +1,22 @@
using EventHub.Localization;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Localization;
namespace EventHub.Permissions
{
public class EventHubPermissionDefinitionProvider : PermissionDefinitionProvider
{
public override void Define(IPermissionDefinitionContext context)
{
var myGroup = context.AddGroup(EventHubPermissions.GroupName);
//Define your own permissions here. Example:
//myGroup.AddPermission(EventHubPermissions.MyPermission1, L("Permission:MyPermission1"));
}
private static LocalizableString L(string name)
{
return LocalizableString.Create<EventHubResource>(name);
}
}
}

10
event-organizer/src/EventHub.Application.Contracts/Permissions/EventHubPermissions.cs

@ -0,0 +1,10 @@
namespace EventHub.Permissions
{
public static class EventHubPermissions
{
public const string GroupName = "EventHub";
//Add your own permission names. Example:
//public const string MyPermission1 = GroupName + ".MyPermission1";
}
}

23
event-organizer/src/EventHub.Application/EventHub.Application.csproj

@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>EventHub</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\EventHub.Domain\EventHub.Domain.csproj" />
<ProjectReference Include="..\EventHub.Application.Contracts\EventHub.Application.Contracts.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Account.Application" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.Identity.Application" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.TenantManagement.Application" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.FeatureManagement.Application" Version="4.2.0-rc.1" />
</ItemGroup>
</Project>

18
event-organizer/src/EventHub.Application/EventHubAppService.cs

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Text;
using EventHub.Localization;
using Volo.Abp.Application.Services;
namespace EventHub
{
/* Inherit your application services from this class.
*/
public abstract class EventHubAppService : ApplicationService
{
protected EventHubAppService()
{
LocalizationResource = typeof(EventHubResource);
}
}
}

14
event-organizer/src/EventHub.Application/EventHubApplicationAutoMapperProfile.cs

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

30
event-organizer/src/EventHub.Application/EventHubApplicationModule.cs

@ -0,0 +1,30 @@
using Volo.Abp.Account;
using Volo.Abp.AutoMapper;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement;
using Volo.Abp.TenantManagement;
namespace EventHub
{
[DependsOn(
typeof(EventHubDomainModule),
typeof(AbpAccountApplicationModule),
typeof(EventHubApplicationContractsModule),
typeof(AbpIdentityApplicationModule),
typeof(AbpPermissionManagementApplicationModule),
typeof(AbpTenantManagementApplicationModule),
typeof(AbpFeatureManagementApplicationModule)
)]
public class EventHubApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<EventHubApplicationModule>();
});
}
}
}

2
event-organizer/src/EventHub.Application/Properties/AssemblyInfo.cs

@ -0,0 +1,2 @@
using System.Runtime.CompilerServices;
[assembly:InternalsVisibleToAttribute("EventHub.Application.Tests")]

43
event-organizer/src/EventHub.DbMigrator/DbMigratorHostedService.cs

@ -0,0 +1,43 @@
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using EventHub.Data;
using Serilog;
using Volo.Abp;
namespace EventHub.DbMigrator
{
public class DbMigratorHostedService : IHostedService
{
private readonly IHostApplicationLifetime _hostApplicationLifetime;
public DbMigratorHostedService(IHostApplicationLifetime hostApplicationLifetime)
{
_hostApplicationLifetime = hostApplicationLifetime;
}
public async Task StartAsync(CancellationToken cancellationToken)
{
using (var application = AbpApplicationFactory.Create<EventHubDbMigratorModule>(options =>
{
options.UseAutofac();
options.Services.AddLogging(c => c.AddSerilog());
}))
{
application.Initialize();
await application
.ServiceProvider
.GetRequiredService<EventHubDbMigrationService>()
.MigrateAsync();
application.Shutdown();
_hostApplicationLifetime.StopApplication();
}
}
public Task StopAsync(CancellationToken cancellationToken) => Task.CompletedTask;
}
}

35
event-organizer/src/EventHub.DbMigrator/EventHub.DbMigrator.csproj

@ -0,0 +1,35 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
<ItemGroup>
<None Remove="appsettings.json" />
</ItemGroup>
<ItemGroup>
<Content Include="appsettings.json">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.*" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Autofac" Version="4.2.0-rc.1" />
<ProjectReference Include="..\EventHub.Application.Contracts\EventHub.Application.Contracts.csproj" />
<ProjectReference Include="..\EventHub.EntityFrameworkCore.DbMigrations\EventHub.EntityFrameworkCore.DbMigrations.csproj" />
</ItemGroup>
</Project>

20
event-organizer/src/EventHub.DbMigrator/EventHubDbMigratorModule.cs

@ -0,0 +1,20 @@
using EventHub.EntityFrameworkCore;
using Volo.Abp.Autofac;
using Volo.Abp.BackgroundJobs;
using Volo.Abp.Modularity;
namespace EventHub.DbMigrator
{
[DependsOn(
typeof(AbpAutofacModule),
typeof(EventHubEntityFrameworkCoreDbMigrationsModule),
typeof(EventHubApplicationContractsModule)
)]
public class EventHubDbMigratorModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpBackgroundJobOptions>(options => options.IsJobExecutionEnabled = false);
}
}
}

40
event-organizer/src/EventHub.DbMigrator/Program.cs

@ -0,0 +1,40 @@
using System.IO;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Serilog;
using Serilog.Events;
namespace EventHub.DbMigrator
{
class Program
{
static async Task Main(string[] args)
{
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
.MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning)
#if DEBUG
.MinimumLevel.Override("EventHub", LogEventLevel.Debug)
#else
.MinimumLevel.Override("EventHub", LogEventLevel.Information)
#endif
.Enrich.FromLogContext()
.WriteTo.Async(c => c.File("Logs/logs.txt"))
.WriteTo.Async(c => c.Console())
.CreateLogger();
await CreateHostBuilder(args).RunConsoleAsync();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureLogging((context, logging) => logging.ClearProviders())
.ConfigureServices((hostContext, services) =>
{
services.AddHostedService<DbMigratorHostedService>();
});
}
}

24
event-organizer/src/EventHub.DbMigrator/appsettings.json

@ -0,0 +1,24 @@
{
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=EventHub;Trusted_Connection=True"
},
"IdentityServer": {
"Clients": {
"EventHub_Web": {
"ClientId": "EventHub_Web",
"ClientSecret": "1q2w3e*",
"RootUrl": "https://localhost:44361"
},
"EventHub_App": {
"ClientId": "EventHub_App",
"ClientSecret": "1q2w3e*",
"RootUrl": "http://localhost:4200"
},
"EventHub_Swagger": {
"ClientId": "EventHub_Swagger",
"ClientSecret": "1q2w3e*",
"RootUrl": "https://localhost:44311"
}
}
}
}

31
event-organizer/src/EventHub.Domain.Shared/EventHub.Domain.Shared.csproj

@ -0,0 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>EventHub</RootNamespace>
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Identity.Domain.Shared" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.IdentityServer.Domain.Shared" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.BackgroundJobs.Domain.Shared" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.AuditLogging.Domain.Shared" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.TenantManagement.Domain.Shared" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.FeatureManagement.Domain.Shared" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Shared" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.SettingManagement.Domain.Shared" Version="4.2.0-rc.1" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Localization\EventHub\*.json" />
<Content Remove="Localization\EventHub\*.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.*" />
</ItemGroup>
</Project>

7
event-organizer/src/EventHub.Domain.Shared/EventHubDomainErrorCodes.cs

@ -0,0 +1,7 @@
namespace EventHub
{
public static class EventHubDomainErrorCodes
{
/* You can add your business exception error codes here, as constants */
}
}

59
event-organizer/src/EventHub.Domain.Shared/EventHubDomainSharedModule.cs

@ -0,0 +1,59 @@
using EventHub.Localization;
using Volo.Abp.AuditLogging;
using Volo.Abp.BackgroundJobs;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.IdentityServer;
using Volo.Abp.Localization;
using Volo.Abp.Localization.ExceptionHandling;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement;
using Volo.Abp.SettingManagement;
using Volo.Abp.TenantManagement;
using Volo.Abp.Validation.Localization;
using Volo.Abp.VirtualFileSystem;
namespace EventHub
{
[DependsOn(
typeof(AbpAuditLoggingDomainSharedModule),
typeof(AbpBackgroundJobsDomainSharedModule),
typeof(AbpFeatureManagementDomainSharedModule),
typeof(AbpIdentityDomainSharedModule),
typeof(AbpIdentityServerDomainSharedModule),
typeof(AbpPermissionManagementDomainSharedModule),
typeof(AbpSettingManagementDomainSharedModule),
typeof(AbpTenantManagementDomainSharedModule)
)]
public class EventHubDomainSharedModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
EventHubGlobalFeatureConfigurator.Configure();
EventHubModuleExtensionConfigurator.Configure();
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<EventHubDomainSharedModule>();
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Add<EventHubResource>("en")
.AddBaseTypes(typeof(AbpValidationResource))
.AddVirtualJson("/Localization/EventHub");
options.DefaultResourceType = typeof(EventHubResource);
});
Configure<AbpExceptionLocalizationOptions>(options =>
{
options.MapCodeNamespace("EventHub", typeof(EventHubResource));
});
}
}
}

23
event-organizer/src/EventHub.Domain.Shared/EventHubGlobalFeatureConfigurator.cs

@ -0,0 +1,23 @@
using Volo.Abp.Threading;
namespace EventHub
{
public static class EventHubGlobalFeatureConfigurator
{
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
public static void Configure()
{
OneTimeRunner.Run(() =>
{
/* You can configure (enable/disable) global features of the used modules here.
*
* YOU CAN SAFELY DELETE THIS CLASS AND REMOVE ITS USAGES IF YOU DON'T NEED TO IT!
*
* Please refer to the documentation to lear more about the Global Features System:
* https://docs.abp.io/en/abp/latest/Global-Features
*/
});
}
}
}

72
event-organizer/src/EventHub.Domain.Shared/EventHubModuleExtensionConfigurator.cs

@ -0,0 +1,72 @@
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Identity;
using Volo.Abp.ObjectExtending;
using Volo.Abp.Threading;
namespace EventHub
{
public static class EventHubModuleExtensionConfigurator
{
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
public static void Configure()
{
OneTimeRunner.Run(() =>
{
ConfigureExistingProperties();
ConfigureExtraProperties();
});
}
private static void ConfigureExistingProperties()
{
/* You can change max lengths for properties of the
* entities defined in the modules used by your application.
*
* Example: Change user and role name max lengths
IdentityUserConsts.MaxNameLength = 99;
IdentityRoleConsts.MaxNameLength = 99;
* Notice: It is not suggested to change property lengths
* unless you really need it. Go with the standard values wherever possible.
*
* If you are using EF Core, you will need to run the add-migration command after your changes.
*/
}
private static void ConfigureExtraProperties()
{
/* You can configure extra properties for the
* entities defined in the modules used by your application.
*
* This class can be used to define these extra properties
* with a high level, easy to use API.
*
* Example: Add a new property to the user entity of the identity module
ObjectExtensionManager.Instance.Modules()
.ConfigureIdentity(identity =>
{
identity.ConfigureUser(user =>
{
user.AddOrUpdateProperty<string>( //property type: string
"SocialSecurityNumber", //property name
property =>
{
//validation rules
property.Attributes.Add(new RequiredAttribute());
property.Attributes.Add(new StringLengthAttribute(64) {MinimumLength = 4});
//...other configurations for this property
}
);
});
});
* See the documentation for more:
* https://docs.abp.io/en/latest/Module-Entity-Extensions
*/
}
}
}

8
event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/ar.json

@ -0,0 +1,8 @@
{
"culture": "ar",
"texts": {
"Menu:Home": "الرئيسية",
"Welcome": "مرحبا",
"LongWelcomeMessage": "مرحبا بكم في التطبيق. هذا مشروع بدء تشغيل يعتمد على إطار عمل ABP. لمزيد من المعلومات ، يرجى زيارة abp.io."
}
}

8
event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/cs.json

@ -0,0 +1,8 @@
{
"culture": "cs",
"texts": {
"Menu:Home": "Úvod",
"Welcome": "Vítejte",
"LongWelcomeMessage": "Vítejte v aplikaci. Toto je startovací projekt založený na ABP frameworku. Pro více informací, navštivte abp.io."
}
}

8
event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/de-DE.json

@ -0,0 +1,8 @@
{
"culture": "de-DE",
"texts": {
"Menu:Home": "Home",
"Welcome": "Willkommen",
"LongWelcomeMessage": "Willkommen bei der Anwendung. Dies ist ein Startup-Projekt, das auf dem ABP-Framework basiert. Weitere Informationen finden Sie unter abp.io."
}
}

8
event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/en-GB.json

@ -0,0 +1,8 @@
{
"culture": "en-GB",
"texts": {
"Menu:Home": "Home",
"Welcome": "Welcome",
"LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io."
}
}

8
event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/en.json

@ -0,0 +1,8 @@
{
"culture": "en",
"texts": {
"Menu:Home": "Home",
"Welcome": "Welcome",
"LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io."
}
}

8
event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/es.json

@ -0,0 +1,8 @@
{
"culture": "es",
"texts": {
"Menu:Home": "Inicio",
"Welcome": "Bienvenido",
"LongWelcomeMessage": "Bienvenido a la aplicación, este es un proyecto base basado en el framework ABP. Para más información, visita abp.io."
}
}

8
event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/fr.json

@ -0,0 +1,8 @@
{
"culture": "fr",
"texts": {
"Menu:Home": "Accueil",
"Welcome": "Bienvenue",
"LongWelcomeMessage": "Bienvenue dans l'application. Il s'agit d'un projet de démarrage basé sur le framework ABP. Pour plus d'informations, visitez abp.io."
}
}

8
event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/hu.json

@ -0,0 +1,8 @@
{
"culture": "hu",
"texts": {
"Menu:Home": "Kezdőlap",
"Welcome": "Üdvözlöm",
"LongWelcomeMessage": "Üdvözöljük az alkalmazásban. Ez egy ABP keretrendszeren alapuló startup projekt. További információkért látogasson el az abp.io oldalra."
}
}

8
event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/nl.json

@ -0,0 +1,8 @@
{
"culture": "nl",
"texts": {
"Menu:Home": "Home",
"Welcome": "Welkom",
"LongWelcomeMessage": "Welkom bij de applicatie. Dit is een startup-project gebaseerd op het ABP-framework. Bezoek abp.io voor meer informatie."
}
}

8
event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/pl-PL.json

@ -0,0 +1,8 @@
{
"culture": "pl-PL",
"texts": {
"Menu:Home": "Home",
"Welcome": "Witaj",
"LongWelcomeMessage": "Witaj w aplikacji. To jest inicjalny projekt bazujący na ABP framework. Po więcej informacji odwiedź stronę abp.io."
}
}

8
event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/pt-BR.json

@ -0,0 +1,8 @@
{
"culture": "pt-BR",
"texts": {
"Menu:Home": "Principal",
"Welcome": "Seja bem-vindo!",
"LongWelcomeMessage": "Bem-vindo a esta aplicação. Este é um projeto inicial baseado no ABP framework. Para mais informações, visite abp.io."
}
}

8
event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/ru.json

@ -0,0 +1,8 @@
{
"culture": "ru",
"texts": {
"Menu:Home": "Главная",
"Welcome": "Добро пожаловать",
"LongWelcomeMessage": "Добро пожаловать в приложение. Этот запущенный проект основан на фреймворке ABP. Для получения дополнительной информации посетите сайт abp.io."
}
}

8
event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/sl.json

@ -0,0 +1,8 @@
{
"culture": "sl",
"texts": {
"Menu:Home": "Domov",
"Welcome": "Dobrodošli",
"LongWelcomeMessage": "Dobrodošli v aplikaciji. To je začetni projekt na osnovi okolja ABP. Za več informacij obiščite abp.io."
}
}

8
event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/tr.json

@ -0,0 +1,8 @@
{
"culture": "tr",
"texts": {
"Menu:Home": "Ana sayfa",
"Welcome": "Hoşgeldiniz",
"LongWelcomeMessage": "Uygulamaya hoşgeldiniz. Bu, ABP framework'ü üzerine bina edilmiş bir başlangıç projesidir. Daha fazla bilgi için abp.io adresini ziyaret edebilirsiniz."
}
}

8
event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/vi.json

@ -0,0 +1,8 @@
{
"culture": "vi",
"texts": {
"Menu:Home": "Trang chủ",
"Welcome": "Chào mừng bạn",
"LongWelcomeMessage": "Chào mừng bạn đến ứng dụng. Đây là một dự án khởi nghiệp dựa trên khung ABP. Để biết thêm thông tin, hãy truy cập abp.io."
}
}

8
event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/zh-Hans.json

@ -0,0 +1,8 @@
{
"culture": "zh-Hans",
"texts": {
"Menu:Home": "首页",
"Welcome": "欢迎",
"LongWelcomeMessage": "欢迎来到该应用程序. 这是一个基于ABP框架的启动项目. 有关更多信息, 请访问 abp.io."
}
}

8
event-organizer/src/EventHub.Domain.Shared/Localization/EventHub/zh-Hant.json

@ -0,0 +1,8 @@
{
"culture": "zh-Hant",
"texts": {
"Menu:Home": "首頁",
"Welcome": "歡迎",
"LongWelcomeMessage": "歡迎來到此應用程式. 這是一個基於ABP框架的起始專案. 有關更多訊息, 請瀏覽 abp.io."
}
}

10
event-organizer/src/EventHub.Domain.Shared/Localization/EventHubResource.cs

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

11
event-organizer/src/EventHub.Domain.Shared/MultiTenancy/MultiTenancyConsts.cs

@ -0,0 +1,11 @@
namespace EventHub.MultiTenancy
{
public static class MultiTenancyConsts
{
/* Enable/disable multi-tenancy easily in a single point.
* If you will never need to multi-tenancy, you can remove
* related modules and code parts, including this file.
*/
public const bool IsEnabled = true;
}
}

182
event-organizer/src/EventHub.Domain/Data/EventHubDbMigrationService.cs

@ -0,0 +1,182 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.MultiTenancy;
using Volo.Abp.TenantManagement;
namespace EventHub.Data
{
public class EventHubDbMigrationService : ITransientDependency
{
public ILogger<EventHubDbMigrationService> Logger { get; set; }
private readonly IDataSeeder _dataSeeder;
private readonly IEnumerable<IEventHubDbSchemaMigrator> _dbSchemaMigrators;
private readonly ITenantRepository _tenantRepository;
private readonly ICurrentTenant _currentTenant;
public EventHubDbMigrationService(
IDataSeeder dataSeeder,
IEnumerable<IEventHubDbSchemaMigrator> dbSchemaMigrators,
ITenantRepository tenantRepository,
ICurrentTenant currentTenant)
{
_dataSeeder = dataSeeder;
_dbSchemaMigrators = dbSchemaMigrators;
_tenantRepository = tenantRepository;
_currentTenant = currentTenant;
Logger = NullLogger<EventHubDbMigrationService>.Instance;
}
public async Task MigrateAsync()
{
try
{
if (!await MigrationsFolderExists())
{
await AddInitialMigration();
return;
}
}
catch (Exception e)
{
Logger.LogWarning("Couldn't determinate if any migrations exist : " + e.Message);
}
Logger.LogInformation("Started database migrations...");
await MigrateDatabaseSchemaAsync();
await SeedDataAsync();
Logger.LogInformation($"Successfully completed host database migrations.");
var tenants = await _tenantRepository.GetListAsync(includeDetails: true);
var migratedDatabaseSchemas = new HashSet<string>();
foreach (var tenant in tenants)
{
using (_currentTenant.Change(tenant.Id))
{
if (tenant.ConnectionStrings.Any())
{
var tenantConnectionStrings = tenant.ConnectionStrings
.Select(x => x.Value)
.ToList();
if (!migratedDatabaseSchemas.IsSupersetOf(tenantConnectionStrings))
{
await MigrateDatabaseSchemaAsync(tenant);
migratedDatabaseSchemas.AddIfNotContains(tenantConnectionStrings);
}
}
await SeedDataAsync(tenant);
}
Logger.LogInformation($"Successfully completed {tenant.Name} tenant database migrations.");
}
Logger.LogInformation("Successfully completed all database migrations.");
Logger.LogInformation("You can safely end this process...");
}
private async Task MigrateDatabaseSchemaAsync(Tenant tenant = null)
{
Logger.LogInformation(
$"Migrating schema for {(tenant == null ? "host" : tenant.Name + " tenant")} database...");
foreach (var migrator in _dbSchemaMigrators)
{
await migrator.MigrateAsync();
}
}
private async Task SeedDataAsync(Tenant tenant = null)
{
Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed...");
await _dataSeeder.SeedAsync(tenant?.Id);
}
private async Task<bool> MigrationsFolderExists()
{
var dbMigrationsProjectFolder = GetDbMigrationsProjectFolderPath();
return Directory.Exists(Path.Combine(dbMigrationsProjectFolder, "migrations"));
}
private async Task AddInitialMigration()
{
Logger.LogInformation("Creating initial migration...");
string argumentPrefix;
string fileName;
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
argumentPrefix = "-c";
fileName = "/bin/bash";
}
else
{
argumentPrefix = "/C";
fileName = "cmd.exe";
}
var procStartInfo = new ProcessStartInfo( fileName,
$"{argumentPrefix} \"abp create-migration-and-run-migrator {GetDbMigrationsProjectFolderPath()}\""
);
try
{
Process.Start(procStartInfo);
}
catch (Exception)
{
throw new Exception("Couldn't run ABP CLI...");
}
}
private static string GetDbMigrationsProjectFolderPath()
{
var slnDirectoryPath = GetSolutionDirectoryPath();
if (slnDirectoryPath == null)
{
throw new Exception("Solution folder not found!");
}
var srcDirectoryPath = Path.Combine(slnDirectoryPath, "src");
return Directory.GetDirectories(srcDirectoryPath)
.FirstOrDefault(d => d.EndsWith(".DbMigrations"));
}
private static string GetSolutionDirectoryPath()
{
var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory());
while (Directory.GetParent(currentDirectory.FullName) != null)
{
currentDirectory = Directory.GetParent(currentDirectory.FullName);
if (Directory.GetFiles(currentDirectory.FullName).FirstOrDefault(f => f.EndsWith(".sln")) != null)
{
return currentDirectory.FullName;
}
}
return null;
}
}
}

9
event-organizer/src/EventHub.Domain/Data/IEventHubDbSchemaMigrator.cs

@ -0,0 +1,9 @@
using System.Threading.Tasks;
namespace EventHub.Data
{
public interface IEventHubDbSchemaMigrator
{
Task MigrateAsync();
}
}

16
event-organizer/src/EventHub.Domain/Data/NullEventHubDbSchemaMigrator.cs

@ -0,0 +1,16 @@
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
namespace EventHub.Data
{
/* This is used if database provider does't define
* IEventHubDbSchemaMigrator implementation.
*/
public class NullEventHubDbSchemaMigrator : IEventHubDbSchemaMigrator, ITransientDependency
{
public Task MigrateAsync()
{
return Task.CompletedTask;
}
}
}

27
event-organizer/src/EventHub.Domain/EventHub.Domain.csproj

@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>EventHub</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\EventHub.Domain.Shared\EventHub.Domain.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Emailing" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.Identity.Domain" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Identity" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.IdentityServer.Domain" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.IdentityServer" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.BackgroundJobs.Domain" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.AuditLogging.Domain" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.TenantManagement.Domain" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.FeatureManagement.Domain" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.SettingManagement.Domain" Version="4.2.0-rc.1" />
</ItemGroup>
</Project>

9
event-organizer/src/EventHub.Domain/EventHubConsts.cs

@ -0,0 +1,9 @@
namespace EventHub
{
public static class EventHubConsts
{
public const string DbTablePrefix = "App";
public const string DbSchema = null;
}
}

46
event-organizer/src/EventHub.Domain/EventHubDomainModule.cs

@ -0,0 +1,46 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using EventHub.MultiTenancy;
using Volo.Abp.AuditLogging;
using Volo.Abp.BackgroundJobs;
using Volo.Abp.Emailing;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.IdentityServer;
using Volo.Abp.Modularity;
using Volo.Abp.MultiTenancy;
using Volo.Abp.PermissionManagement.Identity;
using Volo.Abp.PermissionManagement.IdentityServer;
using Volo.Abp.SettingManagement;
using Volo.Abp.TenantManagement;
namespace EventHub
{
[DependsOn(
typeof(EventHubDomainSharedModule),
typeof(AbpAuditLoggingDomainModule),
typeof(AbpBackgroundJobsDomainModule),
typeof(AbpFeatureManagementDomainModule),
typeof(AbpIdentityDomainModule),
typeof(AbpPermissionManagementDomainIdentityModule),
typeof(AbpIdentityServerDomainModule),
typeof(AbpPermissionManagementDomainIdentityServerModule),
typeof(AbpSettingManagementDomainModule),
typeof(AbpTenantManagementDomainModule),
typeof(AbpEmailingModule)
)]
public class EventHubDomainModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpMultiTenancyOptions>(options =>
{
options.IsEnabled = MultiTenancyConsts.IsEnabled;
});
#if DEBUG
context.Services.Replace(ServiceDescriptor.Singleton<IEmailSender, NullEmailSender>());
#endif
}
}
}

324
event-organizer/src/EventHub.Domain/IdentityServer/IdentityServerDataSeedContributor.cs

@ -0,0 +1,324 @@
using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using IdentityServer4.Models;
using Microsoft.Extensions.Configuration;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Guids;
using Volo.Abp.IdentityServer.ApiResources;
using Volo.Abp.IdentityServer.ApiScopes;
using Volo.Abp.IdentityServer.Clients;
using Volo.Abp.IdentityServer.IdentityResources;
using Volo.Abp.MultiTenancy;
using Volo.Abp.PermissionManagement;
using Volo.Abp.Uow;
using ApiResource = Volo.Abp.IdentityServer.ApiResources.ApiResource;
using ApiScope = Volo.Abp.IdentityServer.ApiScopes.ApiScope;
using Client = Volo.Abp.IdentityServer.Clients.Client;
namespace EventHub.IdentityServer
{
public class IdentityServerDataSeedContributor : IDataSeedContributor, ITransientDependency
{
private readonly IApiResourceRepository _apiResourceRepository;
private readonly IApiScopeRepository _apiScopeRepository;
private readonly IClientRepository _clientRepository;
private readonly IIdentityResourceDataSeeder _identityResourceDataSeeder;
private readonly IGuidGenerator _guidGenerator;
private readonly IPermissionDataSeeder _permissionDataSeeder;
private readonly IConfiguration _configuration;
private readonly ICurrentTenant _currentTenant;
public IdentityServerDataSeedContributor(
IClientRepository clientRepository,
IApiResourceRepository apiResourceRepository,
IApiScopeRepository apiScopeRepository,
IIdentityResourceDataSeeder identityResourceDataSeeder,
IGuidGenerator guidGenerator,
IPermissionDataSeeder permissionDataSeeder,
IConfiguration configuration,
ICurrentTenant currentTenant)
{
_clientRepository = clientRepository;
_apiResourceRepository = apiResourceRepository;
_apiScopeRepository = apiScopeRepository;
_identityResourceDataSeeder = identityResourceDataSeeder;
_guidGenerator = guidGenerator;
_permissionDataSeeder = permissionDataSeeder;
_configuration = configuration;
_currentTenant = currentTenant;
}
[UnitOfWork]
public virtual async Task SeedAsync(DataSeedContext context)
{
using (_currentTenant.Change(context?.TenantId))
{
await _identityResourceDataSeeder.CreateStandardResourcesAsync();
await CreateApiResourcesAsync();
await CreateApiScopesAsync();
await CreateClientsAsync();
}
}
private async Task CreateApiScopesAsync()
{
await CreateApiScopeAsync("EventHub");
}
private async Task CreateApiResourcesAsync()
{
var commonApiUserClaims = new[]
{
"email",
"email_verified",
"name",
"phone_number",
"phone_number_verified",
"role"
};
await CreateApiResourceAsync("EventHub", commonApiUserClaims);
}
private async Task<ApiResource> CreateApiResourceAsync(string name, IEnumerable<string> claims)
{
var apiResource = await _apiResourceRepository.FindByNameAsync(name);
if (apiResource == null)
{
apiResource = await _apiResourceRepository.InsertAsync(
new ApiResource(
_guidGenerator.Create(),
name,
name + " API"
),
autoSave: true
);
}
foreach (var claim in claims)
{
if (apiResource.FindClaim(claim) == null)
{
apiResource.AddUserClaim(claim);
}
}
return await _apiResourceRepository.UpdateAsync(apiResource);
}
private async Task<ApiScope> CreateApiScopeAsync(string name)
{
var apiScope = await _apiScopeRepository.GetByNameAsync(name);
if (apiScope == null)
{
apiScope = await _apiScopeRepository.InsertAsync(
new ApiScope(
_guidGenerator.Create(),
name,
name + " API"
),
autoSave: true
);
}
return apiScope;
}
private async Task CreateClientsAsync()
{
var commonScopes = new[]
{
"email",
"openid",
"profile",
"role",
"phone",
"address",
"EventHub"
};
var configurationSection = _configuration.GetSection("IdentityServer:Clients");
//Web Client
var webClientId = configurationSection["EventHub_Web:ClientId"];
if (!webClientId.IsNullOrWhiteSpace())
{
var webClientRootUrl = configurationSection["EventHub_Web:RootUrl"].EnsureEndsWith('/');
/* EventHub_Web client is only needed if you created a tiered
* solution. Otherwise, you can delete this client. */
await CreateClientAsync(
name: webClientId,
scopes: commonScopes,
grantTypes: new[] { "hybrid" },
secret: (configurationSection["EventHub_Web:ClientSecret"] ?? "1q2w3e*").Sha256(),
redirectUri: $"{webClientRootUrl}signin-oidc",
postLogoutRedirectUri: $"{webClientRootUrl}signout-callback-oidc",
frontChannelLogoutUri: $"{webClientRootUrl}Account/FrontChannelLogout",
corsOrigins: new[] { webClientRootUrl.RemovePostFix("/") }
);
}
//Console Test / Angular Client
var consoleAndAngularClientId = configurationSection["EventHub_App:ClientId"];
if (!consoleAndAngularClientId.IsNullOrWhiteSpace())
{
var webClientRootUrl = configurationSection["EventHub_App:RootUrl"]?.TrimEnd('/');
await CreateClientAsync(
name: consoleAndAngularClientId,
scopes: commonScopes,
grantTypes: new[] { "password", "client_credentials", "authorization_code" },
secret: (configurationSection["EventHub_App:ClientSecret"] ?? "1q2w3e*").Sha256(),
requireClientSecret: false,
redirectUri: webClientRootUrl,
postLogoutRedirectUri: webClientRootUrl,
corsOrigins: new[] { webClientRootUrl.RemovePostFix("/") }
);
}
// Blazor Client
var blazorClientId = configurationSection["EventHub_Blazor:ClientId"];
if (!blazorClientId.IsNullOrWhiteSpace())
{
var blazorRootUrl = configurationSection["EventHub_Blazor:RootUrl"].TrimEnd('/');
await CreateClientAsync(
name: blazorClientId,
scopes: commonScopes,
grantTypes: new[] { "authorization_code" },
secret: configurationSection["EventHub_Blazor:ClientSecret"]?.Sha256(),
requireClientSecret: false,
redirectUri: $"{blazorRootUrl}/authentication/login-callback",
postLogoutRedirectUri: $"{blazorRootUrl}/authentication/logout-callback",
corsOrigins: new[] { blazorRootUrl.RemovePostFix("/") }
);
}
// Swagger Client
var swaggerClientId = configurationSection["EventHub_Swagger:ClientId"];
if (!swaggerClientId.IsNullOrWhiteSpace())
{
var swaggerRootUrl = configurationSection["EventHub_Swagger:RootUrl"].TrimEnd('/');
await CreateClientAsync(
name: swaggerClientId,
scopes: commonScopes,
grantTypes: new[] { "authorization_code" },
secret: configurationSection["EventHub_Swagger:ClientSecret"]?.Sha256(),
requireClientSecret: false,
redirectUri: $"{swaggerRootUrl}/swagger/oauth2-redirect.html",
corsOrigins: new[] { swaggerRootUrl.RemovePostFix("/") }
);
}
}
private async Task<Client> CreateClientAsync(
string name,
IEnumerable<string> scopes,
IEnumerable<string> grantTypes,
string secret = null,
string redirectUri = null,
string postLogoutRedirectUri = null,
string frontChannelLogoutUri = null,
bool requireClientSecret = true,
bool requirePkce = false,
IEnumerable<string> permissions = null,
IEnumerable<string> corsOrigins = null)
{
var client = await _clientRepository.FindByClientIdAsync(name);
if (client == null)
{
client = await _clientRepository.InsertAsync(
new Client(
_guidGenerator.Create(),
name
)
{
ClientName = name,
ProtocolType = "oidc",
Description = name,
AlwaysIncludeUserClaimsInIdToken = true,
AllowOfflineAccess = true,
AbsoluteRefreshTokenLifetime = 31536000, //365 days
AccessTokenLifetime = 31536000, //365 days
AuthorizationCodeLifetime = 300,
IdentityTokenLifetime = 300,
RequireConsent = false,
FrontChannelLogoutUri = frontChannelLogoutUri,
RequireClientSecret = requireClientSecret,
RequirePkce = requirePkce
},
autoSave: true
);
}
foreach (var scope in scopes)
{
if (client.FindScope(scope) == null)
{
client.AddScope(scope);
}
}
foreach (var grantType in grantTypes)
{
if (client.FindGrantType(grantType) == null)
{
client.AddGrantType(grantType);
}
}
if (!secret.IsNullOrEmpty())
{
if (client.FindSecret(secret) == null)
{
client.AddSecret(secret);
}
}
if (redirectUri != null)
{
if (client.FindRedirectUri(redirectUri) == null)
{
client.AddRedirectUri(redirectUri);
}
}
if (postLogoutRedirectUri != null)
{
if (client.FindPostLogoutRedirectUri(postLogoutRedirectUri) == null)
{
client.AddPostLogoutRedirectUri(postLogoutRedirectUri);
}
}
if (permissions != null)
{
await _permissionDataSeeder.SeedAsync(
ClientPermissionValueProvider.ProviderName,
name,
permissions,
null
);
}
if (corsOrigins != null)
{
foreach (var origin in corsOrigins)
{
if (!origin.IsNullOrWhiteSpace() && client.FindCorsOrigin(origin) == null)
{
client.AddCorsOrigin(origin);
}
}
}
return await _clientRepository.UpdateAsync(client);
}
}
}

3
event-organizer/src/EventHub.Domain/Properties/AssemblyInfo.cs

@ -0,0 +1,3 @@
using System.Runtime.CompilerServices;
[assembly:InternalsVisibleToAttribute("EventHub.Domain.Tests")]
[assembly:InternalsVisibleToAttribute("EventHub.TestBase")]

13
event-organizer/src/EventHub.Domain/Settings/EventHubSettingDefinitionProvider.cs

@ -0,0 +1,13 @@
using Volo.Abp.Settings;
namespace EventHub.Settings
{
public class EventHubSettingDefinitionProvider : SettingDefinitionProvider
{
public override void Define(ISettingDefinitionContext context)
{
//Define your own settings here. Example:
//context.Add(new SettingDefinition(EventHubSettings.MySetting1));
}
}
}

10
event-organizer/src/EventHub.Domain/Settings/EventHubSettings.cs

@ -0,0 +1,10 @@
namespace EventHub.Settings
{
public static class EventHubSettings
{
private const string Prefix = "EventHub";
//Add your own setting names here. Example:
//public const string MySetting1 = Prefix + ".MySetting1";
}
}

63
event-organizer/src/EventHub.Domain/Users/AppUser.cs

@ -0,0 +1,63 @@
using System;
using Volo.Abp.Domain.Entities.Auditing;
using Volo.Abp.Users;
namespace EventHub.Users
{
/* This entity shares the same table/collection ("AbpUsers" by default) with the
* IdentityUser entity of the Identity module.
*
* - You can define your custom properties into this class.
* - You never create or delete this entity, because it is Identity module's job.
* - You can query users from database with this entity.
* - You can update values of your custom properties.
*/
public class AppUser : FullAuditedAggregateRoot<Guid>, IUser
{
#region Base properties
/* These properties are shared with the IdentityUser entity of the Identity module.
* Do not change these properties through this class. Instead, use Identity module
* services (like IdentityUserManager) to change them.
* So, this properties are designed as read only!
*/
public virtual Guid? TenantId { get; private set; }
public virtual string UserName { get; private set; }
public virtual string Name { get; private set; }
public virtual string Surname { get; private set; }
public virtual string Email { get; private set; }
public virtual bool EmailConfirmed { get; private set; }
public virtual string PhoneNumber { get; private set; }
public virtual bool PhoneNumberConfirmed { get; private set; }
#endregion
/* Add your own properties here. Example:
*
* public string MyProperty { get; set; }
*
* If you add a property and using the EF Core, remember these;
*
* 1. Update EventHubDbContext.OnModelCreating
* to configure the mapping for your new property
* 2. Update EventHubEfCoreEntityExtensionMappings to extend the IdentityUser entity
* and add your new property to the migration.
* 3. Use the Add-Migration to add a new database migration.
* 4. Run the .DbMigrator project (or use the Update-Database command) to apply
* schema change to the database.
*/
private AppUser()
{
}
}
}

35
event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EntityFrameworkCoreEventHubDbSchemaMigrator.cs

@ -0,0 +1,35 @@
using System;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using EventHub.Data;
using Volo.Abp.DependencyInjection;
namespace EventHub.EntityFrameworkCore
{
public class EntityFrameworkCoreEventHubDbSchemaMigrator
: IEventHubDbSchemaMigrator, ITransientDependency
{
private readonly IServiceProvider _serviceProvider;
public EntityFrameworkCoreEventHubDbSchemaMigrator(
IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
}
public async Task MigrateAsync()
{
/* We intentionally resolving the EventHubMigrationsDbContext
* from IServiceProvider (instead of directly injecting it)
* to properly get the connection string of the current tenant in the
* current scope.
*/
await _serviceProvider
.GetRequiredService<EventHubMigrationsDbContext>()
.Database
.MigrateAsync();
}
}
}

16
event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubEntityFrameworkCoreDbMigrationsModule.cs

@ -0,0 +1,16 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Modularity;
namespace EventHub.EntityFrameworkCore
{
[DependsOn(
typeof(EventHubEntityFrameworkCoreModule)
)]
public class EventHubEntityFrameworkCoreDbMigrationsModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDbContext<EventHubMigrationsDbContext>();
}
}
}

48
event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubMigrationsDbContext.cs

@ -0,0 +1,48 @@
using Microsoft.EntityFrameworkCore;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Identity;
using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.IdentityServer.EntityFrameworkCore;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.TenantManagement.EntityFrameworkCore;
namespace EventHub.EntityFrameworkCore
{
/* This DbContext is only used for database migrations.
* It is not used on runtime. See EventHubDbContext for the runtime DbContext.
* It is a unified model that includes configuration for
* all used modules and your application.
*/
public class EventHubMigrationsDbContext : AbpDbContext<EventHubMigrationsDbContext>
{
public EventHubMigrationsDbContext(DbContextOptions<EventHubMigrationsDbContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
/* Include modules to your migration db context */
builder.ConfigurePermissionManagement();
builder.ConfigureSettingManagement();
builder.ConfigureBackgroundJobs();
builder.ConfigureAuditLogging();
builder.ConfigureIdentity();
builder.ConfigureIdentityServer();
builder.ConfigureFeatureManagement();
builder.ConfigureTenantManagement();
/* Configure your own tables/entities inside the ConfigureEventHub method */
builder.ConfigureEventHub();
}
}
}

33
event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EventHubMigrationsDbContextFactory.cs

@ -0,0 +1,33 @@
using System.IO;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
namespace EventHub.EntityFrameworkCore
{
/* This class is needed for EF Core console commands
* (like Add-Migration and Update-Database commands) */
public class EventHubMigrationsDbContextFactory : IDesignTimeDbContextFactory<EventHubMigrationsDbContext>
{
public EventHubMigrationsDbContext CreateDbContext(string[] args)
{
EventHubEfCoreEntityExtensionMappings.Configure();
var configuration = BuildConfiguration();
var builder = new DbContextOptionsBuilder<EventHubMigrationsDbContext>()
.UseSqlServer(configuration.GetConnectionString("Default"));
return new EventHubMigrationsDbContext(builder.Options);
}
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../EventHub.DbMigrator/"))
.AddJsonFile("appsettings.json", optional: false);
return builder.Build();
}
}
}

18
event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/EventHub.EntityFrameworkCore.DbMigrations.csproj

@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>EventHub</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\EventHub.EntityFrameworkCore\EventHub.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="5.0.*" />
</ItemGroup>
</Project>

2307
event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20201028014149_Initial.Designer.cs

File diff suppressed because it is too large

1362
event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/20201028014149_Initial.cs

File diff suppressed because it is too large

2305
event-organizer/src/EventHub.EntityFrameworkCore.DbMigrations/Migrations/EventHubMigrationsDbContextModelSnapshot.cs

File diff suppressed because it is too large

58
event-organizer/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubDbContext.cs

@ -0,0 +1,58 @@
using Microsoft.EntityFrameworkCore;
using EventHub.Users;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.Modeling;
using Volo.Abp.Identity;
using Volo.Abp.Users.EntityFrameworkCore;
namespace EventHub.EntityFrameworkCore
{
/* This is your actual DbContext used on runtime.
* It includes only your entities.
* It does not include entities of the used modules, because each module has already
* its own DbContext class. If you want to share some database tables with the used modules,
* just create a structure like done for AppUser.
*
* Don't use this DbContext for database migrations since it does not contain tables of the
* used modules (as explained above). See EventHubMigrationsDbContext for migrations.
*/
[ConnectionStringName("Default")]
public class EventHubDbContext : AbpDbContext<EventHubDbContext>
{
public DbSet<AppUser> Users { get; set; }
/* Add DbSet properties for your Aggregate Roots / Entities here.
* Also map them inside EventHubDbContextModelCreatingExtensions.ConfigureEventHub
*/
public EventHubDbContext(DbContextOptions<EventHubDbContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
/* Configure the shared tables (with included modules) here */
builder.Entity<AppUser>(b =>
{
b.ToTable(AbpIdentityDbProperties.DbTablePrefix + "Users"); //Sharing the same table "AbpUsers" with the IdentityUser
b.ConfigureByConvention();
b.ConfigureAbpUser();
/* Configure mappings for your additional properties
* Also see the EventHubEfCoreEntityExtensionMappings class
*/
});
/* Configure your own tables/entities inside the ConfigureEventHub method */
builder.ConfigureEventHub();
}
}
}

22
event-organizer/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubDbContextModelCreatingExtensions.cs

@ -0,0 +1,22 @@
using Microsoft.EntityFrameworkCore;
using Volo.Abp;
namespace EventHub.EntityFrameworkCore
{
public static class EventHubDbContextModelCreatingExtensions
{
public static void ConfigureEventHub(this ModelBuilder builder)
{
Check.NotNull(builder, nameof(builder));
/* Configure your own tables/entities inside here */
//builder.Entity<YourEntity>(b =>
//{
// b.ToTable(EventHubConsts.DbTablePrefix + "YourEntities", EventHubConsts.DbSchema);
// b.ConfigureByConvention(); //auto configure for the base class props
// //...
//});
}
}
}

45
event-organizer/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubEfCoreEntityExtensionMappings.cs

@ -0,0 +1,45 @@
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Identity;
using Volo.Abp.ObjectExtending;
using Volo.Abp.Threading;
namespace EventHub.EntityFrameworkCore
{
public static class EventHubEfCoreEntityExtensionMappings
{
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
public static void Configure()
{
EventHubGlobalFeatureConfigurator.Configure();
EventHubModuleExtensionConfigurator.Configure();
OneTimeRunner.Run(() =>
{
/* You can configure extra properties for the
* entities defined in the modules used by your application.
*
* This class can be used to map these extra properties to table fields in the database.
*
* USE THIS CLASS ONLY TO CONFIGURE EF CORE RELATED MAPPING.
* USE EventHubModuleExtensionConfigurator CLASS (in the Domain.Shared project)
* FOR A HIGH LEVEL API TO DEFINE EXTRA PROPERTIES TO ENTITIES OF THE USED MODULES
*
* Example: Map a property to a table field:
ObjectExtensionManager.Instance
.MapEfCoreProperty<IdentityUser, string>(
"MyProperty",
(entityBuilder, propertyBuilder) =>
{
propertyBuilder.HasMaxLength(128);
}
);
* See the documentation for more:
* https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities
*/
});
}
}
}

52
event-organizer/src/EventHub.EntityFrameworkCore/EntityFrameworkCore/EventHubEntityFrameworkCoreModule.cs

@ -0,0 +1,52 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.SqlServer;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.IdentityServer.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.TenantManagement.EntityFrameworkCore;
namespace EventHub.EntityFrameworkCore
{
[DependsOn(
typeof(EventHubDomainModule),
typeof(AbpIdentityEntityFrameworkCoreModule),
typeof(AbpIdentityServerEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpEntityFrameworkCoreSqlServerModule),
typeof(AbpBackgroundJobsEntityFrameworkCoreModule),
typeof(AbpAuditLoggingEntityFrameworkCoreModule),
typeof(AbpTenantManagementEntityFrameworkCoreModule),
typeof(AbpFeatureManagementEntityFrameworkCoreModule)
)]
public class EventHubEntityFrameworkCoreModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
EventHubEfCoreEntityExtensionMappings.Configure();
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDbContext<EventHubDbContext>(options =>
{
/* Remove "includeAllEntities: true" to create
* default repositories only for aggregate roots */
options.AddDefaultRepositories(includeAllEntities: true);
});
Configure<AbpDbContextOptions>(options =>
{
/* The main point to change your DBMS.
* See also EventHubMigrationsDbContextFactory for EF Core tooling. */
options.UseSqlServer();
});
}
}
}

23
event-organizer/src/EventHub.EntityFrameworkCore/EventHub.EntityFrameworkCore.csproj

@ -0,0 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>EventHub</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\EventHub.Domain\EventHub.Domain.csproj" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.IdentityServer.EntityFrameworkCore" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.BackgroundJobs.EntityFrameworkCore" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.TenantManagement.EntityFrameworkCore" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" Version="4.2.0-rc.1" />
</ItemGroup>
</Project>

2
event-organizer/src/EventHub.EntityFrameworkCore/Properties/AssemblyInfo.cs

@ -0,0 +1,2 @@
using System.Runtime.CompilerServices;
[assembly:InternalsVisibleToAttribute("EventHub.EntityFrameworkCore.Tests")]

22
event-organizer/src/EventHub.HttpApi.Client/EventHub.HttpApi.Client.csproj

@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace>EventHub</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\EventHub.Application.Contracts\EventHub.Application.Contracts.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Account.HttpApi.Client" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.Identity.HttpApi.Client" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi.Client" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.TenantManagement.HttpApi.Client" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.FeatureManagement.HttpApi.Client" Version="4.2.0-rc.1" />
</ItemGroup>
</Project>

31
event-organizer/src/EventHub.HttpApi.Client/EventHubHttpApiClientModule.cs

@ -0,0 +1,31 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Account;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement;
using Volo.Abp.TenantManagement;
namespace EventHub
{
[DependsOn(
typeof(EventHubApplicationContractsModule),
typeof(AbpAccountHttpApiClientModule),
typeof(AbpIdentityHttpApiClientModule),
typeof(AbpPermissionManagementHttpApiClientModule),
typeof(AbpTenantManagementHttpApiClientModule),
typeof(AbpFeatureManagementHttpApiClientModule)
)]
public class EventHubHttpApiClientModule : AbpModule
{
public const string RemoteServiceName = "Default";
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddHttpClientProxies(
typeof(EventHubApplicationContractsModule).Assembly,
RemoteServiceName
);
}
}
}

15
event-organizer/src/EventHub.HttpApi/Controllers/EventHubController.cs

@ -0,0 +1,15 @@
using EventHub.Localization;
using Volo.Abp.AspNetCore.Mvc;
namespace EventHub.Controllers
{
/* Inherit your controllers from this class.
*/
public abstract class EventHubController : AbpController
{
protected EventHubController()
{
LocalizationResource = typeof(EventHubResource);
}
}
}

22
event-organizer/src/EventHub.HttpApi/EventHub.HttpApi.csproj

@ -0,0 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>EventHub</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\EventHub.Application.Contracts\EventHub.Application.Contracts.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Account.HttpApi" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.Identity.HttpApi" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.TenantManagement.HttpApi" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.FeatureManagement.HttpApi" Version="4.2.0-rc.1" />
</ItemGroup>
</Project>

40
event-organizer/src/EventHub.HttpApi/EventHubHttpApiModule.cs

@ -0,0 +1,40 @@
using Localization.Resources.AbpUi;
using EventHub.Localization;
using Volo.Abp.Account;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.HttpApi;
using Volo.Abp.TenantManagement;
namespace EventHub
{
[DependsOn(
typeof(EventHubApplicationContractsModule),
typeof(AbpAccountHttpApiModule),
typeof(AbpIdentityHttpApiModule),
typeof(AbpPermissionManagementHttpApiModule),
typeof(AbpTenantManagementHttpApiModule),
typeof(AbpFeatureManagementHttpApiModule)
)]
public class EventHubHttpApiModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
ConfigureLocalization();
}
private void ConfigureLocalization()
{
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Get<EventHubResource>()
.AddBaseTypes(
typeof(AbpUiResource)
);
});
}
}
}

11
event-organizer/src/EventHub.HttpApi/Models/Test/TestModel.cs

@ -0,0 +1,11 @@
using System;
namespace EventHub.Models.Test
{
public class TestModel
{
public string Name { get; set; }
public DateTime BirthDate { get; set; }
}
}

4
event-organizer/src/EventHub.Web/Components/_ViewImports.cshtml

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

55
event-organizer/src/EventHub.Web/EventHub.Web.csproj

@ -0,0 +1,55 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
<RootNamespace>EventHub.Web</RootNamespace>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<GenerateRuntimeConfigurationFiles>true</GenerateRuntimeConfigurationFiles>
<PreserveCompilationContext>true</PreserveCompilationContext>
<MvcRazorExcludeRefAssembliesFromPublish>false</MvcRazorExcludeRefAssembliesFromPublish>
<PreserveCompilationReferences>true</PreserveCompilationReferences>
<UserSecretsId>EventHub-4681b4fd-151f-4221-84a4-929d86723e4c</UserSecretsId>
</PropertyGroup>
<ItemGroup>
<Compile Remove="Logs\**" />
<Content Remove="Logs\**" />
<EmbeddedResource Remove="Logs\**" />
<None Remove="Logs\**" />
</ItemGroup>
<ItemGroup>
<None Update="Pages\**\*.js">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="Pages\**\*.css">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="3.2.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.4.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="5.0.*" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\EventHub.Application\EventHub.Application.csproj" />
<ProjectReference Include="..\EventHub.HttpApi\EventHub.HttpApi.csproj" />
<ProjectReference Include="..\EventHub.EntityFrameworkCore.DbMigrations\EventHub.EntityFrameworkCore.DbMigrations.csproj" />
<PackageReference Include="Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.Autofac" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.Swashbuckle" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.AspNetCore.Authentication.JwtBearer" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.AspNetCore.Serilog" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.Identity.Web" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.TenantManagement.Web" Version="4.2.0-rc.1" />
<PackageReference Include="Volo.Abp.FeatureManagement.Web" Version="4.2.0-rc.1" />
</ItemGroup>
</Project>

11
event-organizer/src/EventHub.Web/EventHubBrandingProvider.cs

@ -0,0 +1,11 @@
using Volo.Abp.Ui.Branding;
using Volo.Abp.DependencyInjection;
namespace EventHub.Web
{
[Dependency(ReplaceServices = true)]
public class EventHubBrandingProvider : DefaultBrandingProvider
{
public override string AppName => "EventHub";
}
}

12
event-organizer/src/EventHub.Web/EventHubWebAutoMapperProfile.cs

@ -0,0 +1,12 @@
using AutoMapper;
namespace EventHub.Web
{
public class EventHubWebAutoMapperProfile : Profile
{
public EventHubWebAutoMapperProfile()
{
//Define your AutoMapper configuration here for the Web project.
}
}
}

233
event-organizer/src/EventHub.Web/EventHubWebModule.cs

@ -0,0 +1,233 @@
using System;
using System.IO;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using EventHub.EntityFrameworkCore;
using EventHub.Localization;
using EventHub.MultiTenancy;
using EventHub.Web.Menus;
using Microsoft.OpenApi.Models;
using Volo.Abp;
using Volo.Abp.Account.Web;
using Volo.Abp.AspNetCore.Authentication.JwtBearer;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.Localization;
using Volo.Abp.AspNetCore.Mvc.UI;
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
using Volo.Abp.AspNetCore.Serilog;
using Volo.Abp.Autofac;
using Volo.Abp.AutoMapper;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity.Web;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.Web;
using Volo.Abp.Swashbuckle;
using Volo.Abp.TenantManagement.Web;
using Volo.Abp.UI.Navigation.Urls;
using Volo.Abp.UI;
using Volo.Abp.UI.Navigation;
using Volo.Abp.VirtualFileSystem;
namespace EventHub.Web
{
[DependsOn(
typeof(EventHubHttpApiModule),
typeof(EventHubApplicationModule),
typeof(EventHubEntityFrameworkCoreDbMigrationsModule),
typeof(AbpAutofacModule),
typeof(AbpIdentityWebModule),
typeof(AbpAccountWebIdentityServerModule),
typeof(AbpAspNetCoreMvcUiBasicThemeModule),
typeof(AbpAspNetCoreAuthenticationJwtBearerModule),
typeof(AbpTenantManagementWebModule),
typeof(AbpAspNetCoreSerilogModule),
typeof(AbpSwashbuckleModule)
)]
public class EventHubWebModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
context.Services.PreConfigure<AbpMvcDataAnnotationsLocalizationOptions>(options =>
{
options.AddAssemblyResource(
typeof(EventHubResource),
typeof(EventHubDomainModule).Assembly,
typeof(EventHubDomainSharedModule).Assembly,
typeof(EventHubApplicationModule).Assembly,
typeof(EventHubApplicationContractsModule).Assembly,
typeof(EventHubWebModule).Assembly
);
});
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
ConfigureUrls(configuration);
ConfigureBundles();
ConfigureAuthentication(context, configuration);
ConfigureAutoMapper();
ConfigureVirtualFileSystem(hostingEnvironment);
ConfigureLocalizationServices();
ConfigureNavigationServices();
ConfigureAutoApiControllers();
ConfigureSwaggerServices(context.Services);
}
private void ConfigureUrls(IConfiguration configuration)
{
Configure<AppUrlOptions>(options =>
{
options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"];
});
}
private void ConfigureBundles()
{
Configure<AbpBundlingOptions>(options =>
{
options.StyleBundles.Configure(
BasicThemeBundles.Styles.Global,
bundle =>
{
bundle.AddFiles("/global-styles.css");
}
);
});
}
private void ConfigureAuthentication(ServiceConfigurationContext context, IConfiguration configuration)
{
context.Services.AddAuthentication()
.AddJwtBearer(options =>
{
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]);
options.Audience = "EventHub";
});
}
private void ConfigureAutoMapper()
{
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<EventHubWebModule>();
});
}
private void ConfigureVirtualFileSystem(IWebHostEnvironment hostingEnvironment)
{
if (hostingEnvironment.IsDevelopment())
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.ReplaceEmbeddedByPhysical<EventHubDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}EventHub.Domain.Shared"));
options.FileSets.ReplaceEmbeddedByPhysical<EventHubDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}EventHub.Domain"));
options.FileSets.ReplaceEmbeddedByPhysical<EventHubApplicationContractsModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}EventHub.Application.Contracts"));
options.FileSets.ReplaceEmbeddedByPhysical<EventHubApplicationModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}EventHub.Application"));
options.FileSets.ReplaceEmbeddedByPhysical<EventHubWebModule>(hostingEnvironment.ContentRootPath);
});
}
}
private void ConfigureLocalizationServices()
{
Configure<AbpLocalizationOptions>(options =>
{
options.Languages.Add(new LanguageInfo("ar", "ar", "العربية"));
options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština"));
options.Languages.Add(new LanguageInfo("en", "en", "English"));
options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)"));
options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar"));
options.Languages.Add(new LanguageInfo("fr", "fr", "Français"));
options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português"));
options.Languages.Add(new LanguageInfo("ru", "ru", "Русский"));
options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe"));
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文"));
options.Languages.Add(new LanguageInfo("de-DE", "de-DE", "Deutsch", "de"));
options.Languages.Add(new LanguageInfo("es", "es", "Español"));
});
}
private void ConfigureNavigationServices()
{
Configure<AbpNavigationOptions>(options =>
{
options.MenuContributors.Add(new EventHubMenuContributor());
});
}
private void ConfigureAutoApiControllers()
{
Configure<AbpAspNetCoreMvcOptions>(options =>
{
options.ConventionalControllers.Create(typeof(EventHubApplicationModule).Assembly);
});
}
private void ConfigureSwaggerServices(IServiceCollection services)
{
services.AddSwaggerGen(
options =>
{
options.SwaggerDoc("v1", new OpenApiInfo { Title = "EventHub API", Version = "v1" });
options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName);
}
);
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
var env = context.GetEnvironment();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseAbpRequestLocalization();
if (!env.IsDevelopment())
{
app.UseErrorPage();
}
app.UseCorrelationId();
app.UseVirtualFiles();
app.UseRouting();
app.UseAuthentication();
app.UseJwtTokenMiddleware();
if (MultiTenancyConsts.IsEnabled)
{
app.UseMultiTenancy();
}
app.UseUnitOfWork();
app.UseIdentityServer();
app.UseAuthorization();
app.UseSwagger();
app.UseAbpSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "EventHub API");
});
app.UseAuditing();
app.UseAbpSerilogEnrichers();
app.UseConfiguredEndpoints();
}
}
}

34
event-organizer/src/EventHub.Web/Menus/EventHubMenuContributor.cs

@ -0,0 +1,34 @@
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Localization;
using EventHub.Localization;
using EventHub.MultiTenancy;
using Volo.Abp.TenantManagement.Web.Navigation;
using Volo.Abp.UI.Navigation;
namespace EventHub.Web.Menus
{
public class EventHubMenuContributor : IMenuContributor
{
public async Task ConfigureMenuAsync(MenuConfigurationContext context)
{
if (context.Menu.Name == StandardMenus.Main)
{
await ConfigureMainMenuAsync(context);
}
}
private async Task ConfigureMainMenuAsync(MenuConfigurationContext context)
{
if (!MultiTenancyConsts.IsEnabled)
{
var administration = context.Menu.GetAdministration();
administration.TryRemoveMenuItem(TenantManagementMenuNames.GroupName);
}
var l = context.GetLocalizer<EventHubResource>();
context.Menu.Items.Insert(0, new ApplicationMenuItem(EventHubMenus.Home, l["Menu:Home"], "~/"));
}
}
}

11
event-organizer/src/EventHub.Web/Menus/EventHubMenus.cs

@ -0,0 +1,11 @@
namespace EventHub.Web.Menus
{
public class EventHubMenus
{
private const string Prefix = "EventHub";
public const string Home = Prefix + ".Home";
//Add your menu items here...
}
}

15
event-organizer/src/EventHub.Web/Pages/EventHubPageModel.cs

@ -0,0 +1,15 @@
using EventHub.Localization;
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
namespace EventHub.Web.Pages
{
/* Inherit your PageModel classes from this class.
*/
public abstract class EventHubPageModel : AbpPageModel
{
protected EventHubPageModel()
{
LocalizationResourceType = typeof(EventHubResource);
}
}
}

167
event-organizer/src/EventHub.Web/Pages/Index.cshtml

@ -0,0 +1,167 @@
@page
@using Microsoft.AspNetCore.Mvc.Localization
@using EventHub.Localization
@using Volo.Abp.Users
@model EventHub.Web.Pages.IndexModel
@inject IHtmlLocalizer<EventHubResource> L
@inject ICurrentUser CurrentUser
@section styles {
<abp-style-bundle>
<abp-style src="/Pages/Index.css" />
</abp-style-bundle>
}
@section scripts {
<abp-script-bundle>
<abp-script src="/Pages/Index.js" />
</abp-script-bundle>
}
<div class="container">
<div class="p-5 text-center">
<div class="badge badge-success h5 rounded mb-4 " role="alert">
<h5 class="m-1"> <i class="fas fa-rocket"></i> Congratulations, <strong>EventHub</strong> is successfully running!</h5>
</div>
<h1>Welcome to the Application</h1>
<p class="lead px-lg-5 mx-lg-5">@L["LongWelcomeMessage"]</p>
@if (!CurrentUser.IsAuthenticated)
{
<a abp-button="Primary" href="~/Account/Login" ><i class="fa fa-sign-in"></i> @L["Login"]</a>
}
</div>
<div class="my-3 text-center">
<h3>Let's improve your application!</h3>
<p>Here are some links to help you get started:</p>
</div>
<div class="card mt-4 mb-5">
<div class="card-body">
<div class="row text-center justify-content-md-center">
<div class="col-lg-4">
<div class="p-4">
<h5 class="mb-3"><i class="fas fa-book text-secondary d-block my-3 fa-2x"></i> Learn the ABP Framework</h5>
<p>Explore the compherensive documentation to learn how to build a modern web application.</p>
<a href="https://docs.abp.io/en/abp/latest?ref=tmpl" target="_blank" class="btn btn-link px-1">See Documents <i class="fas fa-chevron-right"></i></a>
</div>
</div>
<div class="col-lg-4 border-left">
<div class="p-4">
<h5 class="mb-3"><i class="fas fa-cubes text-secondary d-block my-3 fa-2x"></i> Samples</h5>
<p>See the example projects built with the ABP Framework.</p>
<a href="https://docs.abp.io/en/abp/latest/Samples/Index?ref=tmpl" target="_blank" class="btn btn-link px-1">All samples <i class="fas fa-chevron-right"></i></a>
</div>
</div>
<div class="col-lg-4 border-left">
<div class="p-4">
<h5 class="mb-3"><i class="fas fa-users text-secondary d-block my-3 fa-2x"></i> ABP Community</h5>
<p>Get involved with a vibrant community and become a contributor.</p>
<a href="https://community.abp.io/" target="_blank" class="btn btn-link px-1">Community <i class="fas fa-chevron-right"></i></a>
<a href="https://docs.abp.io/en/abp/latest/Contribution/Index?ref=tmpl" target="_blank" class="btn btn-link px-1">Contribute <i class="fas fa-chevron-right"></i></a>
</div>
</div>
</div>
<div class="row text-center mt-lg-3 justify-content-md-center">
<div class="col-lg-4">
<div class="p-4">
<h5 class="mb-3"><i class="fas fa-pen-nib text-secondary d-block my-3 fa-2x"></i> ABP Blog</h5>
<p>Take a look at our recently published articles.</p>
<a href="https://blog.abp.io/abp?ref=tmpl" target="_blank" class="btn btn-link px-1">See Blog <i class="fas fa-chevron-right"></i></a>
</div>
</div>
<div class="col-lg-4 border-left">
<div class="p-4">
<h5 class="mb-3"><i class="fab fa-github text-secondary d-block my-3 fa-2x"></i> Github</h5>
<p>Do you love the ABP Framework? Please <strong>give a star</strong> to support it!</p>
<p class="mb-1">
<a class="github-button" href="https://github.com/abpframework/abp" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star abpframework/abp on GitHub">Star</a>
<a class="github-button" href="https://github.com/abpframework/abp/issues" data-icon="octicon-issue-opened" data-size="large" data-show-count="false" aria-label="Issue abpframework/abp on GitHub">Issue</a>
<a class="github-button" href="https://github.com/abpframework/abp/fork" data-icon="octicon-repo-forked" data-size="large" data-show-count="false" aria-label="Fork abpframework/abp on GitHub">Fork</a>
</p>
<a href="https://github.com/abpframework/abp/issues/new?template=feature.md" target="_blank" class="btn btn-link px-1">Request a feature <i class="fas fa-chevron-right"></i></a>
<script async defer src="https://buttons.github.io/buttons.js"></script>
</div>
</div>
<div class="col-lg-4 border-left">
<div class="p-4">
<h5 class="mb-3"><i class="fab fa-stack-overflow text-secondary d-block my-3 fa-2x"></i> Stackoverflow</h5>
<p>See answers to previously asked questions or ask a new one.</p>
<a href="https://stackoverflow.com/questions/tagged/abp" target="_blank" class="btn btn-link px-1">Questions <i class="fas fa-chevron-right"></i></a>
<a href="https://stackoverflow.com/questions/ask" target="_blank" class="btn btn-link px-1">Ask a Question <i class="fas fa-chevron-right"></i></a>
</div>
</div>
</div>
</div>
</div>
<div class="mt-5 my-3 text-center">
<h3>Meet the ABP Commercial</h3>
<p>A Complete Web Application Platform Built on the ABP Framework</p>
</div>
<div class="card mt-4 mb-5">
<div class="card-body">
<p class="px-lg-5 mx-lg-5 py-3 text-center">
<a href="https://commercial.abp.io/" target="_blank">ABP Commercial</a> is a platform based on the open source ABP framework. It provides pre-built application modules,
rapid application development tooling, professional UI themes, premium support and more.
</p>
<div class="row text-center justify-content-md-center">
<div class="col-lg-2">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Startup Templates
<a href="https://commercial.abp.io/startup-templates?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
<div class="col-lg-2 border-left">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Application Modules
<a href="https://commercial.abp.io/modules?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
<div class="col-lg-2 border-left">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Developer<br />Tools
<a href="https://commercial.abp.io/tools?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
<div class="col-lg-2 border-left">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> UI<br /> Themes
<a href="https://commercial.abp.io/themes?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
<div class="col-lg-2 border-left">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Premium Support
<a href="https://support.abp.io/QA/Questions?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
<div class="col-lg-2 border-left">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Additional Services
<a href="https://commercial.abp.io/additional-services?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
</div>
</div>
</div>
<div class="mb-5 text-center">
<p class="align-middle">
<a href="https://twitter.com/abpframework" target="_blank" class="mx-2"><i class="fa fa-twitter"></i><span class="text-secondary"> Abp Framework</span></a>
<a href="https://twitter.com/abpcommercial" target="_blank" class="mx-2"><i class="fa fa-twitter"></i><span class="text-secondary"> Abp Commercial</span></a>
<a href="https://github.com/abpframework/abp" target="_blank" class="mx-2"><i class="fa fa-github"></i><span class="text-secondary"> abpframework</span></a>
</p>
</div>
</div>

10
event-organizer/src/EventHub.Web/Pages/Index.cshtml.cs

@ -0,0 +1,10 @@
namespace EventHub.Web.Pages
{
public class IndexModel : EventHubPageModel
{
public void OnGet()
{
}
}
}

3
event-organizer/src/EventHub.Web/Pages/Index.css

@ -0,0 +1,3 @@
body {
}

3
event-organizer/src/EventHub.Web/Pages/Index.js

@ -0,0 +1,3 @@
$(function () {
abp.log.debug('Index.js initialized!');
});

4
event-organizer/src/EventHub.Web/Pages/_ViewImports.cshtml

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

54
event-organizer/src/EventHub.Web/Program.cs

@ -0,0 +1,54 @@
using System;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
using Serilog;
using Serilog.Events;
namespace EventHub.Web
{
public class Program
{
public static int Main(string[] args)
{
Log.Logger = new LoggerConfiguration()
#if DEBUG
.MinimumLevel.Debug()
#else
.MinimumLevel.Information()
#endif
.MinimumLevel.Override("Microsoft", LogEventLevel.Information)
.MinimumLevel.Override("Microsoft.EntityFrameworkCore", LogEventLevel.Warning)
.Enrich.FromLogContext()
.WriteTo.Async(c => c.File("Logs/logs.txt"))
#if DEBUG
.WriteTo.Async(c => c.Console())
#endif
.CreateLogger();
try
{
Log.Information("Starting web host.");
CreateHostBuilder(args).Build().Run();
return 0;
}
catch (Exception ex)
{
Log.Fatal(ex, "Host terminated unexpectedly!");
return 1;
}
finally
{
Log.CloseAndFlush();
}
}
internal static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseStartup<Startup>();
})
.UseAutofac()
.UseSerilog();
}
}

2
event-organizer/src/EventHub.Web/Properties/AssemblyInfo.cs

@ -0,0 +1,2 @@
using System.Runtime.CompilerServices;
[assembly:InternalsVisibleToAttribute("EventHub.Web.Tests")]

27
event-organizer/src/EventHub.Web/Properties/launchSettings.json

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

18
event-organizer/src/EventHub.Web/Startup.cs

@ -0,0 +1,18 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
namespace EventHub.Web
{
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
services.AddApplication<EventHubWebModule>();
}
public void Configure(IApplicationBuilder app)
{
app.InitializeApplication();
}
}
}

4
event-organizer/src/EventHub.Web/Views/_ViewImports.cshtml

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

8
event-organizer/src/EventHub.Web/abp.resourcemapping.js

@ -0,0 +1,8 @@
module.exports = {
aliases: {
},
mappings: {
}
};

2
event-organizer/src/EventHub.Web/appsettings.Development.json

@ -0,0 +1,2 @@
{
}

26
event-organizer/src/EventHub.Web/appsettings.json

@ -0,0 +1,26 @@
{
"App": {
"SelfUrl": "https://localhost:44361"
},
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=EventHub;Trusted_Connection=True"
},
"AuthServer": {
"Authority": "https://localhost:44361",
"RequireHttpsMetadata": "false"
},
"StringEncryption": {
"DefaultPassPhrase": "G25zP3bDjPiacpUa"
},
"Settings": {
"Abp.Mailing.Smtp.Host": "127.0.0.1",
"Abp.Mailing.Smtp.Port": "25",
"Abp.Mailing.Smtp.UserName": "",
"Abp.Mailing.Smtp.Password": "",
"Abp.Mailing.Smtp.Domain": "",
"Abp.Mailing.Smtp.EnableSsl": "false",
"Abp.Mailing.Smtp.UseDefaultCredentials": "true",
"Abp.Mailing.DefaultFromAddress": "noreply@abp.io",
"Abp.Mailing.DefaultFromDisplayName": "ABP application"
}
}

9
event-organizer/src/EventHub.Web/gulpfile.js

@ -0,0 +1,9 @@
"use strict";
var gulp = require("gulp"),
path = require('path'),
copyResources = require('./node_modules/@abp/aspnetcore.mvc.ui/gulp/copy-resources.js');
exports.default = function(){
return copyResources(path.resolve('./'));
};

8
event-organizer/src/EventHub.Web/package.json

@ -0,0 +1,8 @@
{
"version": "1.0.0",
"name": "my-app",
"private": true,
"dependencies": {
"@abp/aspnetcore.mvc.ui.theme.basic": "^4.2.0-rc.1"
}
}

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

Loading…
Cancel
Save