Browse Source

Merge branch 'dev' into Proxy-Contracts

pull/14429/head
maliming 4 years ago
parent
commit
0f1224adf7
No known key found for this signature in database GPG Key ID: 96224957E51C89E
  1. 43
      abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json
  2. 2
      abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json
  3. 2
      abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/hu.json
  4. 2
      abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/tr.json
  5. 2
      abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/zh-Hans.json
  6. 8
      docs/en/CLI.md
  7. 18
      docs/en/UI/Angular/Account-Module.md
  8. 10
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs
  9. 10
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowPageFilter.cs
  10. 8
      framework/src/Volo.Abp.BlazoriseUI/Volo.Abp.BlazoriseUI.csproj
  11. 27
      framework/src/Volo.Abp.Caching.StackExchangeRedis/Volo/Abp/Caching/StackExchangeRedis/AbpRedisCache.cs
  12. 8
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs
  13. 1
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Licensing/DeveloperApiKeyResult.cs
  14. 8
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/DatabaseManagementSystemChangeStep.cs
  15. 2
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Files/FileEntryExtensions.cs
  16. 32
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/RemoveUnnecessaryPortsStep.cs
  17. 14
      framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionConfigurationExtensions.cs
  18. 34
      framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationBase.cs
  19. 3
      framework/src/Volo.Abp.Core/Volo/Abp/IApplicationNameAccessor.cs
  20. 15
      framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AbstractKeyReadOnlyAppService.cs
  21. 2
      framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/Volo.Abp.EntityFrameworkCore.PostgreSql.csproj
  22. 11
      framework/src/Volo.Abp.Swashbuckle/Microsoft/Extensions/DependencyInjection/AbpSwaggerGenServiceCollectionExtensions.cs
  23. 32
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/ExceptionHandingUnitOfWork.cs
  24. 10
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/ExceptionTestController.cs
  25. 24
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/ExceptionTestController_Tests.cs
  26. 5
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/ExceptionTestPage.cshtml.cs
  27. 25
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/ExceptionTestPage_Tests.cs
  28. 8
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkMiddleware_Exception_Rollback_Tests.cs
  29. 8
      framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkPageFilter_Exception_Rollback_Tests.cs
  30. 51
      framework/test/Volo.Abp.Core.Tests/Volo/Abp/AbpApplication_Initialize_Tests.cs
  31. 2
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json
  32. 2
      modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json
  33. 2
      modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/appsettings.json
  34. 2
      modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/appsettings.json
  35. 19
      modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/RedirectToLogin.razor
  36. 13
      modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor.cs
  37. 17
      modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/WebAssemblyRedirectToLogin.razor
  38. 2
      modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile
  39. 2
      modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/appsettings.json
  40. 2
      modules/blogging/app/Volo.BloggingTestApp/appsettings.json
  41. 2
      modules/cms-kit/database/Dockerfile
  42. 4
      modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Dockerfile
  43. 4
      modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/appsettings.json
  44. 4
      modules/cms-kit/host/Volo.CmsKit.IdentityServer/Dockerfile
  45. 2
      modules/cms-kit/host/Volo.CmsKit.IdentityServer/appsettings.json
  46. 2
      modules/cms-kit/host/Volo.CmsKit.Web.Unified/appsettings.json
  47. 4
      modules/docs/app/VoloDocs.Migrator/Dockerfile
  48. 2
      modules/docs/app/VoloDocs.Migrator/appsettings.json
  49. 4
      modules/docs/app/VoloDocs.Web/Dockerfile
  50. 2
      modules/docs/app/VoloDocs.Web/appsettings.json
  51. 2
      modules/openiddict/app/OpenIddict.Demo.Server/appsettings.json
  52. 2
      modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/appsettings.json
  53. 5
      npm/ng-packs/packages/account/src/lib/account.module.ts
  54. 47
      npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts
  55. 1
      npm/ng-packs/packages/account/src/lib/models/config-options.ts
  56. 1
      npm/ng-packs/packages/account/src/lib/tokens/index.ts
  57. 5
      npm/ng-packs/packages/account/src/lib/tokens/re-login-confirmation.token.ts
  58. 1
      npm/ng-packs/packages/components/tree/src/lib/components/tree.component.html
  59. 19
      npm/ng-packs/packages/components/tree/src/lib/components/tree.component.ts
  60. 62
      templates/app-nolayers/angular/src/app/home/home.component.spec.ts
  61. 3
      templates/app-nolayers/angular/src/test.ts
  62. 4
      templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/MyCompanyName.MyProjectName.Blazor.Server.Mongo.csproj
  63. 4
      templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj
  64. 2
      templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/appsettings.json
  65. 2
      templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/appsettings.json
  66. 2
      templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/appsettings.json
  67. 100
      templates/app/angular/src/app/home/home.component.spec.ts
  68. 4
      templates/app/angular/src/test.ts
  69. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/MyCompanyName.MyProjectName.AuthServer.csproj
  70. 4
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/Pages/Index.cshtml.cs
  71. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/appsettings.json
  72. 6
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyCompanyName.MyProjectName.Blazor.Server.Tiered.csproj
  73. 4
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj
  74. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/appsettings.json
  75. 4
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj
  76. 2447
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/global.css
  77. 4
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/index.html
  78. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/appsettings.json
  79. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json
  80. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/appsettings.json
  81. 2
      templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/appsettings.json
  82. 4
      templates/app/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp.csproj
  83. 20
      templates/module/angular/projects/my-project-name/src/lib/my-project-name.component.spec.ts
  84. 15
      templates/module/angular/projects/my-project-name/src/lib/my-project-name.service.spec.ts
  85. 2
      templates/module/aspnet-core/database/Dockerfile
  86. 4
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/Dockerfile
  87. 2
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/appsettings.json
  88. 4
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/MyCompanyName.MyProjectName.Blazor.Host.csproj
  89. 2447
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/wwwroot/global.css
  90. 4
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/wwwroot/index.html
  91. 4
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/MyCompanyName.MyProjectName.Blazor.Server.Host.csproj
  92. 2
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/appsettings.json
  93. 4
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Dockerfile
  94. 4
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json
  95. 2
      templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/appsettings.json
  96. 2
      test/AbpPerfTest/AbpPerfTest.WithAbp/appsettings.json
  97. 2
      test/AbpPerfTest/AbpPerfTest.WithoutAbp/appsettings.json
  98. 2
      test/DistEvents/DistDemoApp.EfCoreRabbitMq/appsettings.json

43
abp_io/AbpIoLocalization/AbpIoLocalization/Commercial/Localization/Resources/en.json

@ -754,6 +754,47 @@
"All": "All",
"Mvc": "MVC",
"DataBaseProvider": "Data Provider",
"UIFramework": "UI Framework"
"UIFramework": "UI Framework",
"LeptonXThemeForDashboard": "LeptonX Theme for Your Admin Dashboard by",
"AbpPlatform": "ABP Platform",
"YouDeserveGoodUXUI": "You deserve a good UI and a better UX. LeptonX Theme by ABP is here to serve it.",
"ViewLiveDemo": "View Live Theme Demo",
"GetLeptonX": "Get LeptonX Now",
"SeeLeptonXDocumentation": "See LeptonX Documentation",
"SimplifiedMenu": "Simplified menu",
"SimplifiedMenuDescription": "You can easily find the page you are looking for by filtering the menu",
"YourFavoritePages": "Your favorite pages at your reach",
"YourFavoritePagesDescription": "Easily add or remove the page from favorites by clicking the star icon in the upper right corner of the page.",
"BreadCrumbs": "Breadcrumb for seamless switching",
"BreadCrumbsDescription": "Using Breadcrumb, you can switch to the pages at the same level with one-click, even when the left menu is closed, and it works on tablet and mobile responsive!",
"YourMenu": "Your menu as you wish",
"YourMenuDescription": "Customize the directly clickable icons and dropdown boxes on the user menu as you wish. User menu is completely customizable for your needs",
"RtlSupport": "RTL support for your language",
"RtlSupportDescription": "LeptonX Theme supports RTL for your language. The language options are in the settings menu for you to change the language.",
"YourColors": "Your colors on your admin dashboard UI",
"YourColorsDescription": "LeptonX Theme works according to your system preferences and has dashboard light theme, dashboard dark theme, and dashboard semi-dark theme options.",
"ArrangeContentWidth": "Easily arrange your content width",
"ArrangeContentWidthDescription": "Easily change the width of your content area.",
"LeptonXCompatibleWith": "LeptonX Theme is compatible with",
"MobileResponsiveTemplate": "Mobile Responsive Template",
"MobileResponsiveTemplateDescription1": "Access your LeptonX admin dashboard from any device you like.",
"MobileResponsiveTemplateDescription2": "It is designed for you to easily use in every device of yours. It is responsive on mobile devices and tablet sizes.",
"TopMenuLayoutOption": "Top Menu Layout Option",
"TopMenuLayoutOptionDescription1": "If you would like to set up your website with the same admin dashboard, it is possible to do it with LeptonX Theme!",
"TopMenuLayoutOptionDescription2": "Just try the LeptonX top menu layout to make it happen!",
"EasilyCustomizable": "Easily customizable for your brand colors",
"EasilyCustomizableDescription1": "You can customize the LeptonX theme using just a few SCSS variables. No overriding, no extra CSS load!",
"EasilyCustomizableDescription2": "With LeptonX, you can arrange your admin dashboard however you like.",
"IndependentLayout": "Independent layout and content area",
"IndependentLayoutDescription1": "LeptonX's layout infrastructure was designed completely separate from the content.",
"IndependentLayoutDescription2": "This means that you can freely design your project with a content structure other than Bootstrap if you want.",
"MostUsedLibraries": "Most used libraries integrated with LeptonX",
"MostUsedLibrariesDescription1": "LeptonX contains your most used libraries. It allows you to use libraries such as ApexCharts, DataTables, DropZone, FullCalender, JSTree, Select2, Toastr effortlessly.",
"MostUsedLibrariesDescription2": "LeptonX also supports MVC Angular and Blazor specific libraries.",
"CreateAndCustomize": "Create and customize the pages you need in seconds with LeptonX custom pages",
"CreateAndCustomizeDescription": "By using LeptonX Theme you also have access to many pre-made html pages. These include many pages such as login page, blog, FAQ, subscription list, invoice, pricing, file management.",
"LeptonThemeForAdmin": "Lepton Theme for your admin dashboard by",
"LeptonThemeForAdminDescription": "Lepton Theme is still available and will be maintained. If you want to switch to LeptonX Theme as a Lepton Theme user, you can see the documentation to learn how-to.",
"LeptonCompatibleWith": "Lepton Theme is compatible with"
}
}

2
abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json

@ -176,7 +176,7 @@
"Events_Page_MetaTitle": "ABP Community Events",
"Events_Page_MetaDescription": "The live shows, hosted by the ABP Team, are casual sessions full of community content, demos, Q&A, and discussions around what's happening in ABP.",
"Events_Page_Title": "ABP<span class=\"gradient-community\"> Community</span> Talks",
"Events_Page_WritingFromUser": "Read writing from {0} on ABP Community.",
"Members_Page_WritingFromUser": "Read writing from {0} on ABP Community.",
"Post_Create_Page_MetaTitle": "New Post",
"Post_Create_Page_MetaDescription": "Create your post for sharing your experiences about ABP framework and contributing the ABP Community.",
"Post_Create_Page_CreateNewPost": "Create New Post",

2
abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/hu.json

@ -176,7 +176,7 @@
"Events_Page_MetaTitle": "ABP közösségi események",
"Events_Page_MetaDescription": "Az ABP Team által rendezett élő műsorok hétköznapi előadások, tele közösségi tartalommal, demókkal, kérdésekkel és válaszokkal, valamint az ABP-ben zajló eseményekről szóló vitákkal.",
"Events_Page_Title": "ABP <span class=\"gradient-community\">közösségi</span> beszélgetések",
"Events_Page_WritingFromUser": "Olvassa el {0} írását az ABP közösségben.",
"Members_Page_WritingFromUser": "Olvassa el {0} írását az ABP közösségben.",
"Post_Create_Page_MetaTitle": "Új bejegyzés",
"Post_Create_Page_MetaDescription": "Hozzon létre bejegyzést, hogy megossza tapasztalatait az ABP keretrendszerrel kapcsolatban, és hozzájáruljon az ABP közösséghez.",
"Post_Create_Page_CreateNewPost": "Új bejegyzés létrehozása",

2
abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/tr.json

@ -182,7 +182,7 @@
"Events_Page_MetaTitle": "ABP Topluluk Etkinlikleri",
"Events_Page_MetaDescription": "ABP Ekibi tarafından düzenlenen canlı programlar, topluluk içeriği, demolar, Soru-Cevap ve ABP'de neler olup bittiğine dair tartışmalarla dolu rahat oturumlardır.",
"Events_Page_Title": "ABP<span class=\"gradient-community\"> Topluluk</span> Konuşmaları",
"Events_Page_WritingFromUser": "ABP Topluluğunda {0} adlı kişiden gelen yazıları okuyun.",
"Members_Page_WritingFromUser": "ABP Topluluğunda {0} adlı kişiden gelen yazıları okuyun.",
"Post_Create_Page_MetaTitle": "Yeni Gönderi",
"Post_Create_Page_MetaDescription": "ABP çerçevesi hakkındaki deneyimlerinizi paylaşmak ve ABP Topluluğuna katkıda bulunmak için gönderinizi oluşturun.",
"Post_Create_Page_CreateNewPost": "Yeni Gönderi Oluştur",

2
abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/zh-Hans.json

@ -176,7 +176,7 @@
"Events_Page_MetaTitle": "ABP 社区活动",
"Events_Page_MetaDescription": "现场活动由 ABP 团队主持,是充满社区内容、演示、问答和围绕 ABP 正在发生的事情的讨论的休闲会议。",
"Events_Page_Title": "ABP<span class=\"gradient-community\">社区</span>会谈",
"Events_Page_WritingFromUser": "阅读来自 ABP 社区的 {0} 的文章。",
"Members_Page_WritingFromUser": "阅读来自 ABP 社区的 {0} 的文章。",
"Post_Create_Page_MetaTitle": "最新帖子",
"Post_Create_Page_MetaDescription": "创建您的帖子以分享您对 ABP 框架的经验并为 ABP 社区做出贡献。",
"Post_Create_Page_CreateNewPost": "创建新帖子",

8
docs/en/CLI.md

@ -129,8 +129,8 @@ For more samples, go to [ABP CLI Create Solution Samples](CLI-New-Command-Sample
* `ef`: Entity Framework Core.
* `mongodb`: MongoDB.
* `--theme`: Specifes the theme. Default theme is `leptonx-lite`. Available themes:
* `leptonx-lite`: [LeptonX Lite Theme](/Themes/LeptonXLite/mvc.md).
* `basic`: [Basic Theme](/UI/AspNetCore/Basic-Theme.md).
* `leptonx-lite`: [LeptonX Lite Theme](Themes/LeptonXLite/AspNetCore.md).
* `basic`: [Basic Theme](UI/AspNetCore/Basic-Theme.md).
* **`module`**: [Module template](Startup-Templates/Module.md). Additional options:
* `--no-ui`: Specifies to not include the UI. This makes possible to create service-only modules (a.k.a. microservices - without UI).
* **`console`**: [Console template](Startup-Templates/Console.md).
@ -144,8 +144,8 @@ For more samples, go to [ABP CLI Create Solution Samples](CLI-New-Command-Sample
* `ef`: Entity Framework Core.
* `mongodb`: MongoDB.
* `--theme`: Specifes the theme. Default theme is `leptonx-lite`. Available themes:
* `leptonx-lite`: [LeptonX Lite Theme](/Themes/LeptonXLite/mvc.md).
* `basic`: [Basic Theme](/UI/AspNetCore/Basic-Theme.md).
* `leptonx-lite`: [LeptonX Lite Theme](Themes/LeptonXLite/AspNetCore.md).
* `basic`: [Basic Theme](UI/AspNetCore/Basic-Theme.md).
* **`maui`**: .NET MAUI. A minimalist .NET MAUI application will be created if you specify this option.
* `--output-folder` or `-o`: Specifies the output folder. Default value is the current directory.
* `--version` or `-v`: Specifies the ABP & template version. It can be a [release tag](https://github.com/abpframework/abp/releases) or a [branch name](https://github.com/abpframework/abp/branches). Uses the latest release if not specified. Most of the times, you will want to use the latest version.

18
docs/en/UI/Angular/Account-Module.md

@ -95,6 +95,24 @@ export class AppRoutingModule {}
Before v4.3, the "My account" link in the current user dropdown on the top bar redirected the user to MVC's profile management page. As of v4.3, if you added the account module to your project, the same link will land on a page in the Angular UI account module instead.
### Personal Info Page Confirm Message
When the user changes their own data on the personal settings tab in My Account, The data can not update the CurrentUser key of Application-Configuration. The information of the user is stored in claims. The only way to apply this information to the CurrentUser of Application-Configuration is user should log out and log in. When the Refresh-Token feature is implemented, it will be fixed. So We've added a confirmation alert.
If you want to disable these warning, You should set `isPersonalSettingsChangedConfirmationActive` false
```js
// app-routing.module.ts
const routes: Routes = [
//...
{
path: 'account',
loadChildren: () => import('@volo/abp.ng.account/public').then(m => m.AccountPublicModule.forLazy({ isPersonalSettingsChangedConfirmationActive:false })),
},
//...
export class AppRoutingModule {}
```
### Security Logs Page [COMMERCIAL]
Before v4.3, the "Security Logs" link in the current user dropdown on the top bar redirected the user to MVC's security logs page. As of v4.3, if you added the account module to your project, the same link will land on a page in the Angular UI account public module instead.

10
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowActionFilter.cs

@ -98,7 +98,15 @@ public class AbpUowActionFilter : IAsyncActionFilter, ITransientDependency
var currentUow = unitOfWorkManager.Current;
if (currentUow != null)
{
await currentUow.SaveChangesAsync(context.HttpContext.RequestAborted);
try
{
await currentUow.SaveChangesAsync(context.HttpContext.RequestAborted);
}
catch (Exception e)
{
await currentUow.RollbackAsync(context.HttpContext.RequestAborted);
throw;
}
}
}

10
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Uow/AbpUowPageFilter.cs

@ -104,7 +104,15 @@ public class AbpUowPageFilter : IAsyncPageFilter, ITransientDependency
var currentUow = unitOfWorkManager.Current;
if (currentUow != null)
{
await currentUow.SaveChangesAsync(context.HttpContext.RequestAborted);
try
{
await currentUow.SaveChangesAsync(context.HttpContext.RequestAborted);
}
catch (Exception e)
{
await currentUow.RollbackAsync(context.HttpContext.RequestAborted);
throw;
}
}
}

8
framework/src/Volo.Abp.BlazoriseUI/Volo.Abp.BlazoriseUI.csproj

@ -14,10 +14,10 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Blazorise" Version="1.1.1" />
<PackageReference Include="Blazorise.DataGrid" Version="1.1.1" />
<PackageReference Include="Blazorise.Snackbar" Version="1.1.1" />
<PackageReference Include="Blazorise.Components" Version="1.1.1" />
<PackageReference Include="Blazorise" Version="1.1.2" />
<PackageReference Include="Blazorise.DataGrid" Version="1.1.2" />
<PackageReference Include="Blazorise.Snackbar" Version="1.1.2" />
<PackageReference Include="Blazorise.Components" Version="1.1.2" />
</ItemGroup>
</Project>

27
framework/src/Volo.Abp.Caching.StackExchangeRedis/Volo/Abp/Caching/StackExchangeRedis/AbpRedisCache.cs

@ -36,34 +36,29 @@ public class AbpRedisCache : RedisCache, ICacheSupportsMultipleItems
static AbpRedisCache()
{
var type = typeof(RedisCache);
RedisDatabaseField = type.GetField("_cache", BindingFlags.Instance | BindingFlags.NonPublic);
SetScriptField = type.GetField("_setScript", BindingFlags.Instance | BindingFlags.NonPublic);
RedisDatabaseField = Check.NotNull(type.GetField("_cache", BindingFlags.Instance | BindingFlags.NonPublic), nameof(RedisDatabaseField));
ConnectMethod = type.GetMethod("Connect", BindingFlags.Instance | BindingFlags.NonPublic);
SetScriptField = Check.NotNull(type.GetField("_setScript", BindingFlags.Instance | BindingFlags.NonPublic), nameof(SetScriptField));
ConnectAsyncMethod = type.GetMethod("ConnectAsync", BindingFlags.Instance | BindingFlags.NonPublic);
ConnectMethod = Check.NotNull(type.GetMethod("Connect", BindingFlags.Instance | BindingFlags.NonPublic), nameof(ConnectMethod));
MapMetadataMethod = type.GetMethod("MapMetadata", BindingFlags.Instance | BindingFlags.NonPublic);
ConnectAsyncMethod = Check.NotNull(type.GetMethod("ConnectAsync", BindingFlags.Instance | BindingFlags.NonPublic), nameof(ConnectAsyncMethod));
GetAbsoluteExpirationMethod =
type.GetMethod("GetAbsoluteExpiration", BindingFlags.Static | BindingFlags.NonPublic);
MapMetadataMethod = Check.NotNull(type.GetMethod("MapMetadata", BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.Static), nameof(MapMetadataMethod));
GetExpirationInSecondsMethod =
type.GetMethod("GetExpirationInSeconds", BindingFlags.Static | BindingFlags.NonPublic);
GetAbsoluteExpirationMethod = Check.NotNull(type.GetMethod("GetAbsoluteExpiration", BindingFlags.Static | BindingFlags.NonPublic), nameof(GetAbsoluteExpirationMethod));
AbsoluteExpirationKey = type.GetField("AbsoluteExpirationKey", BindingFlags.Static | BindingFlags.NonPublic)
?.GetValue(null).ToString();
GetExpirationInSecondsMethod = Check.NotNull(type.GetMethod("GetExpirationInSeconds", BindingFlags.Static | BindingFlags.NonPublic), nameof(GetExpirationInSecondsMethod));
SlidingExpirationKey = type.GetField("SlidingExpirationKey", BindingFlags.Static | BindingFlags.NonPublic)
?.GetValue(null).ToString();
AbsoluteExpirationKey = type.GetField("AbsoluteExpirationKey", BindingFlags.Static | BindingFlags.NonPublic)?.GetValue(null).ToString();
SlidingExpirationKey = type.GetField("SlidingExpirationKey", BindingFlags.Static | BindingFlags.NonPublic)?.GetValue(null).ToString();
DataKey = type.GetField("DataKey", BindingFlags.Static | BindingFlags.NonPublic)?.GetValue(null).ToString();
// ReSharper disable once PossibleNullReferenceException
NotPresent = type.GetField("NotPresent", BindingFlags.Static | BindingFlags.NonPublic).GetValue(null)
.To<int>();
NotPresent = Check.NotNull(type.GetField("NotPresent", BindingFlags.Static | BindingFlags.NonPublic), nameof(NotPresent)).GetValue(null).To<int>();
}
public AbpRedisCache(IOptions<RedisCacheOptions> optionsAccessor)

8
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Bundling/BundlingService.cs

@ -108,15 +108,15 @@ public class BundlingService : IBundlingService, ITransientDependency
Parameters = parameters
};
scriptContext.BundleDefinitions.AddIfNotContains(
x => x.Source == "_framework/blazor.webassembly.js",
() => new BundleDefinition { Source = "_framework/blazor.webassembly.js" });
foreach (var bundleDefinition in bundleDefinitions)
{
var contributor = CreateContributorInstance(bundleDefinition.BundleContributorType);
contributor.AddScripts(scriptContext);
}
scriptContext.BundleDefinitions.AddIfNotContains(
x => x.Source == "_framework/blazor.webassembly.js",
() => new BundleDefinition { Source = "_framework/blazor.webassembly.js" });
return scriptContext;
}

1
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Licensing/DeveloperApiKeyResult.cs

@ -13,6 +13,7 @@ public class DeveloperApiKeyResult
public string ErrorMessage { get; set; }
public LicenseErrorType? ErrorType { get; set; }
public LicenseType LicenseType { get; set; }
public bool IsTrialLicense { get; set; }
public enum LicenseErrorType
{

8
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Building/Steps/DatabaseManagementSystemChangeStep.cs

@ -98,7 +98,13 @@ public class DatabaseManagementSystemChangeStep : ProjectBuildPipelineStep
var oldUseMethod = "UseSqlServer";
var efCoreModuleClass = context.Files.First(f => f.Name.EndsWith("EntityFrameworkCoreModule.cs", StringComparison.OrdinalIgnoreCase));
var efCoreModuleClass = context.Files.FirstOrDefault(f => f.Name.EndsWith("EntityFrameworkCoreModule.cs", StringComparison.OrdinalIgnoreCase));
if(efCoreModuleClass == null)
{
return;
}
efCoreModuleClass.ReplaceText(oldUseMethod, newUseMethodForEfModule);
var dbContextFactoryFile = context.Files.FirstOrDefault(f => f.Name.EndsWith($"{(_hasDbMigrations ? "Migrations" : string.Empty)}DbContextFactoryBase.cs", StringComparison.OrdinalIgnoreCase))

2
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Files/FileEntryExtensions.cs

@ -120,7 +120,7 @@ public static class FileEntryExtensions
}
}
if ((i + 1 < lines.Length) && (lines[i + 1].Contains("<TEMPLATE-REMOVE")))
if (i < lines.Length - 1 && lines[i+1].Contains("<TEMPLATE-REMOVE"))
{
continue;
}

32
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/RemoveUnnecessaryPortsStep.cs

@ -32,23 +32,28 @@ public class RemoveUnnecessaryPortsStep : ProjectBuildPipelineStep
if (context.BuildArgs.UiFramework != UiFramework.Angular)
{
appJson.Property("ClientUrl")?.Remove();
portsToRemoveFromCors.Add("4200");
var clientUrl = appJson.Property("ClientUrl")?.ToString();
portsToRemoveFromCors.Add("http://localhost:4200");
if (!clientUrl.IsNullOrWhiteSpace())
{
httpApiHostAppSettings.SetContent(httpApiHostAppSettings.Content.Replace(clientUrl, string.Empty));
}
}
if (context.BuildArgs.UiFramework != UiFramework.Blazor)
{
portsToRemoveFromCors.Add("44307");
portsToRemoveFromCors.Add("https://localhost:44307");
}
if (appJson["CorsOrigins"] != null)
{
appJson["CorsOrigins"] = string.Join(",",
appJson["CorsOrigins"].ToString().Split(",").Where(u => !portsToRemoveFromCors.Any(u.EndsWith))
);
var corsOrigins = appJson["CorsOrigins"].ToString();
var newCorsOrigins = string.Join(",", corsOrigins.Split(',').Where(x => !portsToRemoveFromCors.Contains(x)));
httpApiHostAppSettings.SetContent(httpApiHostAppSettings.Content.Replace(corsOrigins, newCorsOrigins));
}
httpApiHostAppSettings.SetContent(JsonConvert.SerializeObject(appSettingsJson, Formatting.Indented));
}
private static void RemoveUnnecessaryDbMigratorClients(ProjectBuildContext context)
@ -58,8 +63,13 @@ public class RemoveUnnecessaryPortsStep : ProjectBuildPipelineStep
f.Name.Contains("MyCompanyName.MyProjectName.DbMigrator") && f.Name.EndsWith("appsettings.json"));
var appSettingsJsonObject = JObject.Parse(dbMigratorAppSettings.Content);
var authServerJsonObject = (JObject)appSettingsJsonObject["IdentityServer"] ?? (JObject)appSettingsJsonObject["OpenIddict"];
var clientsJsonObject = (JObject)authServerJsonObject["Clients"] ?? (JObject)authServerJsonObject["Applications"];
var authServerJsonObject = (JObject)appSettingsJsonObject?["IdentityServer"] ?? (JObject)appSettingsJsonObject["OpenIddict"];
var clientsJsonObject = (JObject)authServerJsonObject?["Clients"] ?? (JObject)authServerJsonObject?["Applications"];
if (clientsJsonObject == null)
{
return;
}
if (context.BuildArgs.UiFramework != UiFramework.Blazor)
{

14
framework/src/Volo.Abp.Core/Microsoft/Extensions/DependencyInjection/ServiceCollectionConfigurationExtensions.cs

@ -1,6 +1,8 @@
using Microsoft.Extensions.Configuration;
using JetBrains.Annotations;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Hosting;
using Volo.Abp;
namespace Microsoft.Extensions.DependencyInjection;
@ -11,7 +13,15 @@ public static class ServiceCollectionConfigurationExtensions
return services.Replace(ServiceDescriptor.Singleton<IConfiguration>(configuration));
}
[NotNull]
public static IConfiguration GetConfiguration(this IServiceCollection services)
{
return services.GetConfigurationOrNull() ??
throw new AbpException("Could not find an implementation of " + typeof(IConfiguration).AssemblyQualifiedName + " in the service collection.");
}
[CanBeNull]
public static IConfiguration GetConfigurationOrNull(this IServiceCollection services)
{
var hostBuilderContext = services.GetSingletonInstanceOrNull<HostBuilderContext>();
if (hostBuilderContext?.Configuration != null)
@ -19,6 +29,6 @@ public static class ServiceCollectionConfigurationExtensions
return hostBuilderContext.Configuration as IConfigurationRoot;
}
return services.GetSingletonInstance<IConfiguration>();
return services.GetSingletonInstanceOrNull<IConfiguration>();
}
}

34
framework/src/Volo.Abp.Core/Volo/Abp/AbpApplicationBase.cs

@ -23,7 +23,7 @@ public abstract class AbpApplicationBase : IAbpApplication
public IServiceCollection Services { get; }
public IReadOnlyList<IAbpModuleDescriptor> Modules { get; }
public string ApplicationName { get; }
private bool _configuredServices;
@ -43,8 +43,8 @@ public abstract class AbpApplicationBase : IAbpApplication
var options = new AbpApplicationCreationOptions(services);
optionsAction?.Invoke(options);
ApplicationName = options.ApplicationName;
ApplicationName = GetApplicationName(options);
services.AddSingleton<IAbpApplication>(this);
services.AddSingleton<IApplicationNameAccessor>(this);
@ -147,7 +147,7 @@ public abstract class AbpApplicationBase : IAbpApplication
public virtual async Task ConfigureServicesAsync()
{
CheckMultipleConfigureServices();
var context = new ServiceConfigurationContext(Services);
Services.AddSingleton(context);
@ -312,4 +312,30 @@ public abstract class AbpApplicationBase : IAbpApplication
_configuredServices = true;
}
private static string GetApplicationName(AbpApplicationCreationOptions options)
{
if (!string.IsNullOrWhiteSpace(options.ApplicationName))
{
return options.ApplicationName;
}
var configuration = options.Services.GetConfigurationOrNull();
if (configuration != null)
{
var appNameConfig = configuration["ApplicationName"];
if (!string.IsNullOrWhiteSpace(appNameConfig))
{
return appNameConfig;
}
}
var entryAssembly = Assembly.GetEntryAssembly();
if (entryAssembly != null)
{
return entryAssembly.GetName().Name;
}
return null;
}
}

3
framework/src/Volo.Abp.Core/Volo/Abp/IApplicationNameAccessor.cs

@ -1,3 +1,5 @@
using JetBrains.Annotations;
namespace Volo.Abp;
public interface IApplicationNameAccessor
@ -7,5 +9,6 @@ public interface IApplicationNameAccessor
/// This is useful for systems with multiple applications, to distinguish
/// resources of the applications located together.
/// </summary>
[CanBeNull]
string ApplicationName { get; }
}

15
framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/AbstractKeyReadOnlyAppService.cs

@ -63,14 +63,19 @@ public abstract class AbstractKeyReadOnlyAppService<TEntity, TGetOutputDto, TGet
await CheckGetListPolicyAsync();
var query = await CreateFilteredQueryAsync(input);
var totalCount = await AsyncExecuter.CountAsync(query);
query = ApplySorting(query, input);
query = ApplyPaging(query, input);
var entities = new List<TEntity>();
var entityDtos = new List<TGetListOutputDto>();
if (totalCount > 0)
{
query = ApplySorting(query, input);
query = ApplyPaging(query, input);
var entities = await AsyncExecuter.ToListAsync(query);
var entityDtos = await MapToGetListOutputDtosAsync(entities);
entities = await AsyncExecuter.ToListAsync(query);
entityDtos = await MapToGetListOutputDtosAsync(entities);
}
return new PagedResultDto<TGetListOutputDto>(
totalCount,

2
framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/Volo.Abp.EntityFrameworkCore.PostgreSql.csproj

@ -19,7 +19,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.0-rc.1" />
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="7.0.0-rc.2" />
</ItemGroup>
</Project>

11
framework/src/Volo.Abp.Swashbuckle/Microsoft/Extensions/DependencyInjection/AbpSwaggerGenServiceCollectionExtensions.cs

@ -33,8 +33,13 @@ public static class AbpSwaggerGenServiceCollectionExtensions
this IServiceCollection services,
[NotNull] string authority,
[NotNull] Dictionary<string, string> scopes,
Action<SwaggerGenOptions> setupAction = null)
Action<SwaggerGenOptions> setupAction = null,
string authorizationEndpoint = "/connect/authorize",
string tokenEndpoint = "/connect/token")
{
var authorizationUrl = new Uri($"{authority.TrimEnd('/')}{authorizationEndpoint.EnsureStartsWith('/')}");
var tokenUrl = new Uri($"{authority.TrimEnd('/')}{tokenEndpoint.EnsureStartsWith('/')}");
return services
.AddAbpSwaggerGen()
.AddSwaggerGen(
@ -47,9 +52,9 @@ public static class AbpSwaggerGenServiceCollectionExtensions
{
AuthorizationCode = new OpenApiOAuthFlow
{
AuthorizationUrl = new Uri($"{authority.EnsureEndsWith('/')}connect/authorize"),
AuthorizationUrl = authorizationUrl,
Scopes = scopes,
TokenUrl = new Uri($"{authority.EnsureEndsWith('/')}connect/token")
TokenUrl = tokenUrl
}
}
});

32
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/ExceptionHandingUnitOfWork.cs

@ -0,0 +1,32 @@
using System;
using System.Data;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Volo.Abp.Data;
using Volo.Abp.Uow;
using Volo.Abp.Users;
namespace Volo.Abp.AspNetCore.Mvc.ExceptionHandling;
public class ExceptionHandingUnitOfWork : UnitOfWork
{
public ExceptionHandingUnitOfWork(
IServiceProvider serviceProvider,
IUnitOfWorkEventPublisher unitOfWorkEventPublisher,
IOptions<AbpUnitOfWorkDefaultOptions> options)
: base(serviceProvider, unitOfWorkEventPublisher, options)
{
}
public async override Task SaveChangesAsync(CancellationToken cancellationToken = default)
{
if (ServiceProvider.GetRequiredService<ICurrentUser>().Id == Guid.Empty)
{
throw new AbpDbConcurrencyException();
}
await base.SaveChangesAsync(cancellationToken);
}
}

10
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/ExceptionTestController.cs

@ -1,4 +1,5 @@
using Microsoft.AspNetCore.Mvc;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Authorization;
namespace Volo.Abp.AspNetCore.Mvc.ExceptionHandling;
@ -26,4 +27,11 @@ public class ExceptionTestController : AbpController
{
throw new AbpAuthorizationException("This is a sample exception!");
}
[HttpGet]
[Route("ExceptionOnUowSaveChange")]
public Task<string> ExceptionOnUowSaveChangeAsync()
{
return Task.FromResult("OK");
}
}

24
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/ExceptionTestController_Tests.cs

@ -3,12 +3,14 @@ using System.Net;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Hosting;
using NSubstitute;
using Shouldly;
using Volo.Abp.ExceptionHandling;
using Volo.Abp.Http;
using Volo.Abp.Security.Claims;
using Volo.Abp.Uow;
using Xunit;
namespace Volo.Abp.AspNetCore.Mvc.ExceptionHandling;
@ -31,6 +33,8 @@ public class ExceptionTestController_Tests : AspNetCoreMvcTestBase
_fakeExceptionSubscriber = Substitute.For<IExceptionSubscriber>();
services.AddSingleton(_fakeExceptionSubscriber);
services.Replace(ServiceDescriptor.Transient<IUnitOfWork, ExceptionHandingUnitOfWork>());
}
[Fact]
@ -93,4 +97,24 @@ public class ExceptionTestController_Tests : AspNetCoreMvcTestBase
.HandleAsync(Arg.Any<ExceptionNotificationContext>());
#pragma warning restore 4014
}
[Fact]
public async Task Should_Handle_Exception_On_Uow_SaveChangeAsync()
{
FakeRequiredService.Claims.AddRange(new[]
{
new Claim(AbpClaimTypes.UserId, Guid.Empty.ToString())
});
var result = await GetResponseAsObjectAsync<RemoteServiceErrorResponse>("/api/exception-test/ExceptionOnUowSaveChange", HttpStatusCode.Conflict);
result.Error.ShouldNotBeNull();
result.Error.Message.ShouldBe("The data you have submitted has already changed by another user/client. Please discard the changes you've done and try from the beginning.");
#pragma warning disable 4014
_fakeExceptionSubscriber
.Received()
.HandleAsync(Arg.Any<ExceptionNotificationContext>());
#pragma warning restore 4014
}
}

5
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/ExceptionTestPage.cshtml.cs

@ -36,4 +36,9 @@ public class ExceptionTestPage : AbpPageModel
{
throw new AbpAuthorizationException("This is a sample exception!");
}
public Task<JsonResult> OnGetExceptionOnUowSaveChangeAsync()
{
return Task.FromResult(new JsonResult("OK"));
}
}

25
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ExceptionHandling/ExceptionTestPage_Tests.cs

@ -3,12 +3,14 @@ using System.Net;
using System.Security.Claims;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Hosting;
using NSubstitute;
using Shouldly;
using Volo.Abp.ExceptionHandling;
using Volo.Abp.Http;
using Volo.Abp.Security.Claims;
using Volo.Abp.Uow;
using Xunit;
namespace Volo.Abp.AspNetCore.Mvc.ExceptionHandling;
@ -31,6 +33,8 @@ public class ExceptionTestPage_Tests : AspNetCoreMvcTestBase
_fakeExceptionSubscriber = Substitute.For<IExceptionSubscriber>();
services.AddSingleton(_fakeExceptionSubscriber);
services.Replace(ServiceDescriptor.Transient<IUnitOfWork, ExceptionHandingUnitOfWork>());
}
[Fact]
@ -140,4 +144,25 @@ public class ExceptionTestPage_Tests : AspNetCoreMvcTestBase
.HandleAsync(Arg.Any<ExceptionNotificationContext>());
#pragma warning restore 4014
}
[Fact]
public async Task Should_Handle_Exception_On_Uow_SaveChangeAsync()
{
_fakeRequiredService.Claims.AddRange(new[]
{
new Claim(AbpClaimTypes.UserId, Guid.Empty.ToString())
});
var result = await GetResponseAsObjectAsync<RemoteServiceErrorResponse>("/api/exception-test/ExceptionOnUowSaveChange", HttpStatusCode.Conflict);
result.Error.ShouldNotBeNull();
result.Error.Message.ShouldBe("The data you have submitted has already changed by another user/client. Please discard the changes you've done and try from the beginning.");
#pragma warning disable 4014
_fakeExceptionSubscriber
.Received()
.HandleAsync(Arg.Any<ExceptionNotificationContext>());
#pragma warning restore 4014
}
}

8
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkMiddleware_Exception_Rollback_Tests.cs

@ -2,15 +2,23 @@
using System.Net;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Hosting;
using Shouldly;
using Volo.Abp.Http;
using Volo.Abp.Json;
using Volo.Abp.Uow;
using Xunit;
namespace Volo.Abp.AspNetCore.Mvc.Uow;
public class UnitOfWorkMiddleware_Exception_Rollback_Tests : AspNetCoreMvcTestBase
{
protected override void ConfigureServices(HostBuilderContext context, IServiceCollection services)
{
services.Replace(ServiceDescriptor.Transient<IUnitOfWork, TestUnitOfWork>());
}
[Fact]
public async Task Should_Rollback_Transaction_For_Handled_Exceptions()
{

8
framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Uow/UnitOfWorkPageFilter_Exception_Rollback_Tests.cs

@ -2,15 +2,23 @@
using System.Net;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Hosting;
using Shouldly;
using Volo.Abp.Http;
using Volo.Abp.Json;
using Volo.Abp.Uow;
using Xunit;
namespace Volo.Abp.AspNetCore.Mvc.Uow;
public class UnitOfWorkPageFilter_Exception_Rollback_Tests : AspNetCoreMvcTestBase
{
protected override void ConfigureServices(HostBuilderContext context, IServiceCollection services)
{
services.Replace(ServiceDescriptor.Transient<IUnitOfWork, TestUnitOfWork>());
}
[Fact]
public async Task Should_Rollback_Transaction_For_Handled_Exceptions()
{

51
framework/test/Volo.Abp.Core.Tests/Volo/Abp/AbpApplication_Initialize_Tests.cs

@ -1,10 +1,16 @@
using System.Threading.Tasks;
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using NSubstitute;
using Shouldly;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Modularity;
using Volo.Abp.Modularity.PlugIns;
using Xunit;
using IConfiguration = Castle.Core.Configuration.IConfiguration;
namespace Volo.Abp;
@ -147,8 +153,8 @@ public class AbpApplication_Initialize_Tests
[Fact]
public void Should_Set_And_Get_ApplicationName()
{
const string applicationName = "MyApplication";
var applicationName = "MyApplication";
using (var application = AbpApplicationFactory.Create<IndependentEmptyModule>(options =>
{
options.ApplicationName = applicationName;
@ -156,16 +162,49 @@ public class AbpApplication_Initialize_Tests
{
application.ApplicationName.ShouldBe(applicationName);
application.Services.GetApplicationName().ShouldBe(applicationName);
application.Initialize();
application.ServiceProvider
.GetRequiredService<IApplicationNameAccessor>()
.ApplicationName
.ShouldBe(applicationName);
}
using (var application = AbpApplicationFactory.Create<IndependentEmptyModule>(options =>
{
options.Services.ReplaceConfiguration(new ConfigurationBuilder()
.AddInMemoryCollection(new Dictionary<string, string> {{"ApplicationName", applicationName}})
.Build());
}))
{
application.ApplicationName.ShouldBe(applicationName);
application.Services.GetApplicationName().ShouldBe(applicationName);
application.Initialize();
application.ServiceProvider
.GetRequiredService<IApplicationNameAccessor>()
.ApplicationName
.ShouldBe(applicationName);
}
applicationName = Assembly.GetEntryAssembly()?.GetName().Name;
using (var application = AbpApplicationFactory.Create<IndependentEmptyModule>())
{
application.ApplicationName.ShouldBe(applicationName);
application.Services.GetApplicationName().ShouldBe(applicationName);
application.Initialize();
application.ServiceProvider
.GetRequiredService<IApplicationNameAccessor>()
.ApplicationName
.ShouldBe(applicationName);
}
}
[Fact]
public async Task Should_Resolve_Root_Service_Provider()
{

2
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/en.json

@ -34,6 +34,8 @@
"DisplayName:PhoneNumber": "Phone number",
"PersonalSettings": "Personal settings",
"PersonalSettingsSaved": "Personal settings saved",
"PersonalSettingsChangedConfirmationModalTitle": "Personal info changed",
"PersonalSettingsChangedConfirmationModalDescription": "If you want to apply these changes, you have to login. Do you want to log out?",
"PasswordChanged": "Password changed",
"NewPasswordConfirmFailed": "Please confirm the new password.",
"NewPasswordSameAsOld": "New password must be different from the old one.",

2
modules/account/src/Volo.Abp.Account.Application.Contracts/Volo/Abp/Account/Localization/Resources/tr.json

@ -34,6 +34,8 @@
"DisplayName:PhoneNumber": "Telefon numarası",
"PersonalSettings": "Kişisel ayarlar",
"PersonalSettingsSaved": "Kişisel ayarlar kaydedildi",
"PersonalSettingsChangedConfirmationModalTitle": "Personal info changed",
"PersonalSettingsChangedConfirmationModalDescription": "If you want to apply these changes, you have to login. Do you want to log out?",
"PasswordChanged": "Şifre değiştirildi",
"NewPasswordConfirmFailed": "Lütfen yeni şifreyi onaylayın.",
"NewPasswordSameAsOld": "Yeni şifre eski şifre ile aynı olamaz.",

2
modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/appsettings.json

@ -1,5 +1,5 @@
{
"ConnectionStrings": {
"Default": "Server=localhost;Database=BackgroundJobsDemoApp;Trusted_Connection=True"
"Default": "Server=localhost;Database=BackgroundJobsDemoApp;Trusted_Connection=True;TrustServerCertificate=True"
}
}

2
modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/appsettings.json

@ -1,5 +1,5 @@
{
"ConnectionStrings": {
"Default": "Server=localhost;Database=BackgroundJobsDemoApp;Trusted_Connection=True"
"Default": "Server=localhost;Database=BackgroundJobsDemoApp;Trusted_Connection=True;TrustServerCertificate=True"
}
}

19
modules/basic-theme/src/Volo.Abp.AspNetCore.Components.Web.BasicTheme/Themes/Basic/RedirectToLogin.razor

@ -1,17 +1,10 @@
@inject NavigationManager Navigation
@inject IJSRuntime JSRuntime
@code {
@code {
protected override void OnInitialized()
{
bool isWebAssembly = JSRuntime is IJSInProcessRuntime;
if (isWebAssembly)
{
Navigation.NavigateTo($"authentication/login?returnUrl={Uri.EscapeDataString(Navigation.Uri)}");
}
else
{
Navigation.NavigateTo($"account/login?returnUrl={Uri.EscapeDataString(Navigation.Uri)}", true);
}
}
}
Navigation.NavigateTo($"account/login?returnUrl={Uri.EscapeDataString(Navigation.Uri)}", true);
}
}

13
modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/LoginDisplay.razor.cs

@ -18,9 +18,6 @@ public partial class LoginDisplay : IDisposable
[Inject]
public AuthenticationStateProvider AuthenticationStateProvider { get; set; }
[CanBeNull]
protected SignOutSessionStateManager SignOutManager;
protected ApplicationMenu Menu { get; set; }
protected override async Task OnInitializedAsync()
@ -29,8 +26,6 @@ public partial class LoginDisplay : IDisposable
Navigation.LocationChanged += OnLocationChanged;
LazyGetService(ref SignOutManager);
AuthenticationStateProvider.AuthenticationStateChanged +=
AuthenticationStateProviderOnAuthenticationStateChanged;
}
@ -65,12 +60,8 @@ public partial class LoginDisplay : IDisposable
}
}
private async Task BeginSignOut()
private void BeginSignOut()
{
if (SignOutManager != null)
{
await SignOutManager.SetSignOutState();
await NavigateToAsync("authentication/logout");
}
Navigation.NavigateToLogout("authentication/logout");
}
}

17
modules/basic-theme/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/WebAssemblyRedirectToLogin.razor

@ -0,0 +1,17 @@
@inject NavigationManager Navigation
@using Volo.Abp.DependencyInjection
@using Volo.Abp.AspNetCore.Components.Web.BasicTheme.Themes.Basic
@using Microsoft.AspNetCore.Components.WebAssembly.Authentication
@inherits RedirectToLogin
@attribute [ExposeServices(typeof(RedirectToLogin))]
@attribute [Dependency(ReplaceServices = true)]
@code {
protected override void OnInitialized()
{
Navigation.NavigateToLogin("authentication/login");
}
}

2
modules/basic-theme/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Dockerfile

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/aspnet:6.0.0-bullseye-slim AS base
FROM mcr.microsoft.com/dotnet/aspnet:7.0-bullseye-slim AS base
WORKDIR /app
EXPOSE 80
COPY bin/Release/publish .

2
modules/blob-storing-database/host/BlobStoring.Database.Host.ConsoleApp/src/BlobStoring.Database.Host.ConsoleApp.ConsoleApp/appsettings.json

@ -1,5 +1,5 @@
{
"ConnectionStrings": {
"Default": "Server=localhost;Database=BlobStoring_Host;Trusted_Connection=True"
"Default": "Server=localhost;Database=BlobStoring_Host;Trusted_Connection=True;TrustServerCertificate=True"
}
}

2
modules/blogging/app/Volo.BloggingTestApp/appsettings.json

@ -1,6 +1,6 @@
{
"ConnectionStrings": {
"SqlServer": "Server=localhost;Database=BloggingTestApp;Trusted_Connection=True",
"SqlServer": "Server=localhost;Database=BloggingTestApp;Trusted_Connection=True;TrustServerCertificate=True",
"MongoDb": "mongodb://localhost:27017/BloggingTestApp"
}
}

2
modules/cms-kit/database/Dockerfile

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build
FROM mcr.microsoft.com/dotnet/core/sdk:7.0 AS build
COPY . .
WORKDIR /templates/service/host/IdentityServerHost

4
modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/Dockerfile

@ -1,8 +1,8 @@
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim AS base
FROM mcr.microsoft.com/dotnet/core/aspnet:7.0-bullseye-slim AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build
FROM mcr.microsoft.com/dotnet/core/sdk:7.0 AS build
WORKDIR /src
COPY . .
WORKDIR /src/templates/service/host/Volo.CmsKit.HttpApi.Host

4
modules/cms-kit/host/Volo.CmsKit.HttpApi.Host/appsettings.json

@ -3,8 +3,8 @@
"CorsOrigins": "https://*.CmsKit.com,http://localhost:4200"
},
"ConnectionStrings": {
"Default": "Server=localhost;Database=CmsKit_Main;Trusted_Connection=True",
"CmsKit": "Server=localhost;Database=CmsKit_Module;Trusted_Connection=True"
"Default": "Server=localhost;Database=CmsKit_Main;Trusted_Connection=True;TrustServerCertificate=True",
"CmsKit": "Server=localhost;Database=CmsKit_Module;Trusted_Connection=True;TrustServerCertificate=True"
},
"Redis": {
"Configuration": "127.0.0.1"

4
modules/cms-kit/host/Volo.CmsKit.IdentityServer/Dockerfile

@ -1,8 +1,8 @@
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim AS base
FROM mcr.microsoft.com/dotnet/core/aspnet:7.0-bullseye-slim AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build
FROM mcr.microsoft.com/dotnet/core/sdk:7.0 AS build
WORKDIR /src
COPY . .
WORKDIR /src/templates/service/host/Volo.CmsKit.IdentityServer

2
modules/cms-kit/host/Volo.CmsKit.IdentityServer/appsettings.json

@ -5,7 +5,7 @@
},
"AppSelfUrl": "https://localhost:44318/",
"ConnectionStrings": {
"Default": "Server=localhost;Database=CmsKit_Main;Trusted_Connection=True"
"Default": "Server=localhost;Database=CmsKit_Main;Trusted_Connection=True;TrustServerCertificate=True"
},
"Redis": {
"Configuration": "127.0.0.1"

2
modules/cms-kit/host/Volo.CmsKit.Web.Unified/appsettings.json

@ -1,5 +1,5 @@
{
"ConnectionStrings": {
"Default": "Server=(localdb)\\MSSQLLocalDB;Database=CmsKit_Unified;Trusted_Connection=True"
"Default": "Server=(localdb)\\MSSQLLocalDB;Database=CmsKit_Unified;Trusted_Connection=True;TrustServerCertificate=True"
}
}

4
modules/docs/app/VoloDocs.Migrator/Dockerfile

@ -1,8 +1,8 @@
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim AS base
FROM mcr.microsoft.com/dotnet/core/aspnet:7.0-bullseye-slim AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build
FROM mcr.microsoft.com/dotnet/core/sdk:7.0 AS build
WORKDIR /src
COPY . .
WORKDIR "/src/modules/docs/app/VoloDocs.Migrator"

2
modules/docs/app/VoloDocs.Migrator/appsettings.json

@ -1,3 +1,3 @@
{
"ConnectionString": "Server=localhost;Database=VoloDocs;Trusted_Connection=True"
"ConnectionString": "Server=localhost;Database=VoloDocs;Trusted_Connection=True;TrustServerCertificate=True"
}

4
modules/docs/app/VoloDocs.Web/Dockerfile

@ -1,8 +1,8 @@
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim AS base
FROM mcr.microsoft.com/dotnet/core/aspnet:7.0-bullseye-slim AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build
FROM mcr.microsoft.com/dotnet/core/sdk:7.0 AS build
WORKDIR /src
COPY . .
WORKDIR "/src/modules/docs/app/VoloDocs.Web"

2
modules/docs/app/VoloDocs.Web/appsettings.json

@ -1,5 +1,5 @@
{
"ConnectionString": "Server=localhost;Database=VoloDocs;Trusted_Connection=True",
"ConnectionString": "Server=localhost;Database=VoloDocs;Trusted_Connection=True;TrustServerCertificate=True",
"ElasticSearch": {
"Url": "http://localhost:9200"
},

2
modules/openiddict/app/OpenIddict.Demo.Server/appsettings.json

@ -1,6 +1,6 @@
{
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=OpenIddict-Demo-Server;Trusted_Connection=True"
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=OpenIddict-Demo-Server;Trusted_Connection=True;TrustServerCertificate=True"
},
"Logging": {
"LogLevel": {

2
modules/setting-management/app/Volo.Abp.SettingManagement.DemoApp/appsettings.json

@ -1,5 +1,5 @@
{
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=SettingManagementDemoApp;Trusted_Connection=True"
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=SettingManagementDemoApp;Trusted_Connection=True;TrustServerCertificate=True"
}
}

5
npm/ng-packs/packages/account/src/lib/account.module.ts

@ -15,6 +15,7 @@ import { accountConfigOptionsFactory } from './utils/factory-utils';
import { AuthenticationFlowGuard } from './guards/authentication-flow.guard';
import { ForgotPasswordComponent } from './components/forgot-password/forgot-password.component';
import { ResetPasswordComponent } from './components/reset-password/reset-password.component';
import { RE_LOGIN_CONFIRMATION_TOKEN } from './tokens';
import { UiExtensionsModule } from '@abp/ng.theme.shared/extensions';
import { ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS } from './tokens/extensions.token';
import { AccountExtensionsGuard } from './guards/extensions.guard';
@ -55,6 +56,10 @@ export class AccountModule {
useFactory: accountConfigOptionsFactory,
deps: [ACCOUNT_CONFIG_OPTIONS],
},
{
provide: RE_LOGIN_CONFIRMATION_TOKEN,
useValue: options.isPersonalSettingsChangedConfirmationActive ?? true,
},
{
provide: ACCOUNT_EDIT_FORM_PROP_CONTRIBUTORS,
useValue: options.editFormPropContributors,

47
npm/ng-packs/packages/account/src/lib/components/personal-settings/personal-settings.component.ts

@ -1,10 +1,12 @@
import { ProfileDto, ProfileService } from '@abp/ng.account.core/proxy';
import { ToasterService } from '@abp/ng.theme.shared';
import { Component, Injector, OnInit, ViewEncapsulation } from '@angular/core';
import { Confirmation, ConfirmationService, ToasterService } from '@abp/ng.theme.shared';
import { Component, Inject, Injector, OnInit, ViewEncapsulation } from '@angular/core';
import { UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
import { finalize } from 'rxjs/operators';
import { finalize, filter } from 'rxjs/operators';
import { Account } from '../../models/account';
import { ManageProfileStateService } from '../../services/manage-profile.state.service';
import { AuthService } from '@abp/ng.core';
import { RE_LOGIN_CONFIRMATION_TOKEN } from '../../tokens';
import {
EXTENSIONS_IDENTIFIER,
FormPropData,
@ -34,12 +36,17 @@ export class PersonalSettingsComponent
form: UntypedFormGroup;
inProgress: boolean;
private profile: ProfileDto;
constructor(
private fb: UntypedFormBuilder,
private toasterService: ToasterService,
private profileService: ProfileService,
private manageProfileState: ManageProfileStateService,
private readonly authService: AuthService,
private confirmationService: ConfirmationService,
@Inject(RE_LOGIN_CONFIRMATION_TOKEN)
private isPersonalSettingsChangedConfirmationActive: boolean,
protected injector: Injector,
) {}
@ -58,6 +65,7 @@ export class PersonalSettingsComponent
submit() {
if (this.form.invalid) return;
const isLogOutConfirmMessageVisible = this.isLogoutConfirmMessageActive();
this.inProgress = true;
this.profileService
.update(this.form.value)
@ -65,6 +73,39 @@ export class PersonalSettingsComponent
.subscribe(profile => {
this.manageProfileState.setProfile(profile);
this.toasterService.success('AbpAccount::PersonalSettingsSaved', 'Success', { life: 5000 });
if (isLogOutConfirmMessageVisible) {
this.showLogoutConfirmMessage();
}
});
}
isDataSame(oldValue, newValue) {
return Object.entries(oldValue).some(([key, value]) => {
if (key in newValue) {
return value !== newValue[key];
}
return false;
});
}
logoutConfirmation = () => {
this.authService.logout().subscribe();
};
private isLogoutConfirmMessageActive() {
if (!this.isPersonalSettingsChangedConfirmationActive) {
return false;
}
return this.isDataSame(this.profile, this.form.value);
}
private showLogoutConfirmMessage() {
this.confirmationService
.info(
'AbpAccount::PersonalSettingsChangedConfirmationModalDescription',
'AbpAccount::PersonalSettingsChangedConfirmationModalTitle',
)
.pipe(filter(status => status === Confirmation.Status.confirm))
.subscribe(this.logoutConfirmation);
}
}

1
npm/ng-packs/packages/account/src/lib/models/config-options.ts

@ -4,6 +4,7 @@ import { UpdateProfileDto } from '@abp/ng.account.core/proxy';
export interface AccountConfigOptions {
redirectUrl?: string;
isPersonalSettingsChangedConfirmationActive?: boolean;
editFormPropContributors?: AccountEditFormPropContributors;
}
export type AccountEditFormPropContributors = Partial<{

1
npm/ng-packs/packages/account/src/lib/tokens/index.ts

@ -1,2 +1,3 @@
export * from './config-options.token';
export * from './re-login-confirmation.token';
export * from './extensions.token';

5
npm/ng-packs/packages/account/src/lib/tokens/re-login-confirmation.token.ts

@ -0,0 +1,5 @@
import { InjectionToken } from '@angular/core';
export const RE_LOGIN_CONFIRMATION_TOKEN = new InjectionToken<boolean>(
'RE_LOGIN_CONFIRMATION_TOKEN',
);

1
npm/ng-packs/packages/components/tree/src/lib/components/tree.component.html

@ -16,7 +16,6 @@
></nz-tree>
<ng-template #treeTemplate let-node>
<div
class="node-wrapper"
[class.selected]="isNodeSelected(node)"
[title]="node.title"
(click)="onSelectedNodeChange(node)"

19
npm/ng-packs/packages/components/tree/src/lib/components/tree.component.ts

@ -3,6 +3,7 @@ import {
ContentChild,
EventEmitter,
Input,
OnChanges,
Output,
TemplateRef,
ViewEncapsulation,
@ -24,7 +25,7 @@ export type DropEvent = NzFormatEmitEvent & { pos: number };
],
encapsulation: ViewEncapsulation.None,
})
export class TreeComponent {
export class TreeComponent implements OnChanges {
dropPosition: number;
dropdowns = {} as { [key: string]: NgbDropdown };
@ -44,19 +45,31 @@ export class TreeComponent {
@Input() nodes = [];
@Input() expandedKeys: string[] = [];
@Input() selectedNode: any;
@Input() changeCheckboxWithNode: boolean;
@Input() changedNodeValues = [];
@Input() isNodeSelected = node => this.selectedNode?.id === node.key;
@Input() beforeDrop = (event: NzFormatBeforeDropEvent) => {
this.dropPosition = event.pos;
return of(false);
};
ngOnChanges() {
this.checkedKeys = [...this.changedNodeValues];
}
onSelectedNodeChange(node) {
this.selectedNode = node.origin.entity;
this.selectedNodeChange.emit(node.origin.entity);
if (this.changeCheckboxWithNode) {
this.selectedNodeChange.emit(node);
this.checkedKeys = [...this.changedNodeValues];
this.checkedKeysChange.emit(this.changedNodeValues);
} else {
this.selectedNodeChange.emit(node.origin.entity);
}
}
onCheckboxChange(event) {
this.checkedKeys = [...event.keys];
this.checkedKeys = this.changedNodeValues = [...event.keys];
this.checkedKeysChange.emit(event.keys);
}

62
templates/app-nolayers/angular/src/app/home/home.component.spec.ts

@ -0,0 +1,62 @@
import { CoreTestingModule } from '@abp/ng.core/testing';
import { ThemeBasicTestingModule } from '@abp/ng.theme.basic/testing';
import { ThemeSharedTestingModule } from '@abp/ng.theme.shared/testing';
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { NgxValidateCoreModule } from '@ngx-validate/core';
import { HomeComponent } from './home.component';
import { OAuthService } from 'angular-oauth2-oidc';
import { AuthService } from '@abp/ng.core';
describe('HomeComponent', () => {
let fixture: ComponentFixture<HomeComponent>;
const mockOAuthService = jasmine.createSpyObj('OAuthService', ['hasValidAccessToken']);
const mockAuthService = jasmine.createSpyObj('AuthService', ['navigateToLogin']);
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [HomeComponent],
imports: [
CoreTestingModule.withConfig(),
ThemeSharedTestingModule.withConfig(),
ThemeBasicTestingModule.withConfig(),
NgxValidateCoreModule,
],
providers: [
/* mock providers here */
{
provide: OAuthService,
useValue: mockOAuthService,
},
{
provide: AuthService,
useValue: mockAuthService,
},
],
}).compileComponents();
}));
beforeEach(() => {
fixture = TestBed.createComponent(HomeComponent);
fixture.detectChanges();
});
it('should be initiated', () => {
expect(fixture.componentInstance).toBeTruthy();
});
describe('when login state is true', () => {
beforeAll(() => {
mockOAuthService.hasValidAccessToken.and.returnValue(true);
});
it('hasLoggedIn should be true', () => {
expect(fixture.componentInstance.hasLoggedIn).toBeTrue();
expect(mockOAuthService.hasValidAccessToken).toHaveBeenCalled();
});
it('button should not be exists', () => {
const element = fixture.nativeElement;
const cardTitle = element.querySelector('.card-title');
expect(cardTitle).toBeTruthy();
});
});
});

3
templates/app-nolayers/angular/src/test.ts

@ -1,11 +1,10 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
import 'zone.js/testing';
declare const require: {
context(

4
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/MyCompanyName.MyProjectName.Blazor.Server.Mongo.csproj

@ -7,8 +7,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Blazorise.Bootstrap5" Version="1.1.1" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.1.1" />
<PackageReference Include="Blazorise.Bootstrap5" Version="1.1.2" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.1.2" />
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
</ItemGroup>

4
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj

@ -7,8 +7,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Blazorise.Bootstrap5" Version="1.1.1" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.1.1" />
<PackageReference Include="Blazorise.Bootstrap5" Version="1.1.2" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.1.2" />
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
</ItemGroup>

2
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/appsettings.json

@ -4,7 +4,7 @@
"RedirectAllowedUrls": "https://localhost:44300"
},
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True"
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;TrustServerCertificate=True"
},
"StringEncryption": {
"DefaultPassPhrase": "gsKnGZ041HLL4IM8"

2
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/appsettings.json

@ -6,7 +6,7 @@
"RedirectAllowedUrls": "http://localhost:4200"
},
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True"
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;TrustServerCertificate=True"
},
"AuthServer": {
"Authority": "https://localhost:44300",

2
templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/appsettings.json

@ -3,7 +3,7 @@
"SelfUrl": "https://localhost:44300"
},
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True"
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;TrustServerCertificate=True"
},
"StringEncryption": {
"DefaultPassPhrase": "gsKnGZ041HLL4IM8"

100
templates/app/angular/src/app/home/home.component.spec.ts

@ -0,0 +1,100 @@
import { CoreTestingModule } from "@abp/ng.core/testing";
import { ThemeBasicTestingModule } from "@abp/ng.theme.basic/testing";
import { ThemeSharedTestingModule } from "@abp/ng.theme.shared/testing";
import { ComponentFixture, TestBed, waitForAsync } from "@angular/core/testing";
import { NgxValidateCoreModule } from "@ngx-validate/core";
import { HomeComponent } from "./home.component";
import { OAuthService } from 'angular-oauth2-oidc';
import { AuthService } from '@abp/ng.core';
describe("HomeComponent", () => {
let fixture: ComponentFixture<HomeComponent>;
const mockOAuthService = jasmine.createSpyObj('OAuthService', ['hasValidAccessToken'])
const mockAuthService = jasmine.createSpyObj('AuthService', ['navigateToLogin'])
beforeEach(
waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [HomeComponent],
imports: [
CoreTestingModule.withConfig(),
ThemeSharedTestingModule.withConfig(),
ThemeBasicTestingModule.withConfig(),
NgxValidateCoreModule,
],
providers: [
/* mock providers here */
{
provide: OAuthService,
useValue: mockOAuthService
},
{
provide: AuthService,
useValue: mockAuthService
}
],
}).compileComponents();
})
);
beforeEach(() => {
fixture = TestBed.createComponent(HomeComponent);
fixture.detectChanges();
});
it("should be initiated", () => {
expect(fixture.componentInstance).toBeTruthy();
});
describe('when login state is true', () => {
beforeAll(() => {
mockOAuthService.hasValidAccessToken.and.returnValue(true)
});
it("hasLoggedIn should be true", () => {
expect(fixture.componentInstance.hasLoggedIn).toBeTrue();
expect(mockOAuthService.hasValidAccessToken).toHaveBeenCalled()
})
it("button should not be exists", () => {
const element = fixture.nativeElement
const button = element.querySelector('[role="button"]')
expect(button).toBeNull()
})
})
describe('when login state is false', () => {
beforeAll(() => {
mockOAuthService.hasValidAccessToken.and.returnValue(false)
});
it("hasLoggedIn should be false", () => {
expect(fixture.componentInstance.hasLoggedIn).toBeFalse();
expect(mockOAuthService.hasValidAccessToken).toHaveBeenCalled()
})
it("button should be exists", () => {
const element = fixture.nativeElement
const button = element.querySelector('[role="button"]')
expect(button).toBeDefined()
})
describe('when button clicked', () => {
beforeEach(() => {
const element = fixture.nativeElement
const button = element.querySelector('[role="button"]')
button.click()
});
it("navigateToLogin have been called", () => {
expect(mockAuthService.navigateToLogin).toHaveBeenCalled()
})
})
})
});

4
templates/app/angular/src/test.ts

@ -1,11 +1,11 @@
// This file is required by karma.conf.js and loads recursively all the .spec and framework files
import 'zone.js/testing';
import { getTestBed } from '@angular/core/testing';
import {
BrowserDynamicTestingModule,
platformBrowserDynamicTesting,
} from '@angular/platform-browser-dynamic/testing';
import 'zone.js/testing';
declare const require: {
context(

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/MyCompanyName.MyProjectName.AuthServer.csproj

@ -33,7 +33,7 @@
<ItemGroup>
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="6.0.5" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="7.0.0-rc.2.*" />
<PackageReference Include="DistributedLock.Redis" Version="1.0.2" />
</ItemGroup>

4
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/Pages/Index.cshtml.cs

@ -19,9 +19,9 @@ public class IndexModel : AbpPageModel
protected ILanguageProvider LanguageProvider { get; }
public IndexModel(IOpenIddictApplicationRepository openIdApplicationmRepository, ILanguageProvider languageProvider)
public IndexModel(IOpenIddictApplicationRepository openIdApplicationRepository, ILanguageProvider languageProvider)
{
OpenIdApplicationRepository = openIdApplicationmRepository;
OpenIdApplicationRepository = openIdApplicationRepository;
LanguageProvider = languageProvider;
}

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/appsettings.json

@ -6,7 +6,7 @@
"RedirectAllowedUrls": "http://localhost:4200,https://localhost:44302,https://localhost:44307,https://localhost:44309"
},
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True"
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;TrustServerCertificate=True"
},
"Redis": {
"Configuration": "127.0.0.1"

6
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyCompanyName.MyProjectName.Blazor.Server.Tiered.csproj

@ -13,11 +13,11 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Blazorise.Bootstrap5" Version="1.1.1" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.1.1" />
<PackageReference Include="Blazorise.Bootstrap5" Version="1.1.2" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.1.2" />
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="6.0.5" />
<PackageReference Include="Microsoft.AspNetCore.DataProtection.StackExchangeRedis" Version="7.0.0-rc.2.*" />
<PackageReference Include="DistributedLock.Redis" Version="1.0.2" />
</ItemGroup>

4
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj

@ -13,8 +13,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Blazorise.Bootstrap5" Version="1.1.1" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.1.1" />
<PackageReference Include="Blazorise.Bootstrap5" Version="1.1.2" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.1.2" />
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
</ItemGroup>

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/appsettings.json

@ -4,7 +4,7 @@
"RedirectAllowedUrls": "https://localhost:44308"
},
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True"
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;TrustServerCertificate=True"
},
"AuthServer": {
"Authority": "https://localhost:44308",

4
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj

@ -11,8 +11,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Blazorise.Bootstrap5" Version="1.1.1" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.1.1" />
<PackageReference Include="Blazorise.Bootstrap5" Version="1.1.2" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.0-rc.2.*" />
</ItemGroup>

2447
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/global.css

File diff suppressed because one or more lines are too long

4
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/wwwroot/index.html

@ -8,7 +8,7 @@
<base href="/" />
<!--ABP:Styles-->
<link href="global.css?_v=638017039908773205" rel="stylesheet"/>
<link href="global.css?_v=638019471644954402" rel="stylesheet"/>
<link href="main.css" rel="stylesheet"/>
<!--/ABP:Styles-->
<link href="MyCompanyName.MyProjectName.Blazor.styles.css" rel="stylesheet"/>
@ -29,7 +29,7 @@
</div>
<!--ABP:Scripts-->
<script src="global.js?_v=638017039911003206"></script>
<script src="global.js?_v=638019471646687054"></script>
<!--/ABP:Scripts-->
<!-- <TEMPLATE-REMOVE IF-NOT='PWA'> -->

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/appsettings.json

@ -1,6 +1,6 @@
{
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True"
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;TrustServerCertificate=True"
},
"OpenIddict": {
"Applications": {

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json

@ -3,7 +3,7 @@
"CorsOrigins": "https://*.MyProjectName.com,http://localhost:4200,https://localhost:44307"
},
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True"
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;TrustServerCertificate=True"
},
"Redis": {
"Configuration": "127.0.0.1"

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/appsettings.json

@ -6,7 +6,7 @@
"RedirectAllowedUrls": "http://localhost:4200,https://localhost:44307"
},
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True"
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;TrustServerCertificate=True"
},
"AuthServer": {
"Authority": "https://localhost:44305",

2
templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/appsettings.json

@ -3,7 +3,7 @@
"SelfUrl": "https://localhost:44303"
},
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True"
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName;Trusted_Connection=True;TrustServerCertificate=True"
},
"StringEncryption": {
"DefaultPassPhrase": "gsKnGZ041HLL4IM8"

4
templates/app/aspnet-core/test/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp/MyCompanyName.MyProjectName.HttpApi.Client.ConsoleTestApp.csproj

@ -21,8 +21,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="6.0.1" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="6.0.5" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Http.Polly" Version="7.0.0-rc.2.*" />
</ItemGroup>
</Project>

20
templates/module/angular/projects/my-project-name/src/lib/my-project-name.component.spec.ts

@ -1,16 +1,24 @@
import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
import { MyProjectNameComponent } from './my-project-name.component';
import { MyProjectNameComponent } from './components/my-project-name.component';
import { MyProjectNameService } from '@my-company-name/my-project-name';
import { of } from 'rxjs';
describe('MyProjectNameComponent', () => {
let component: MyProjectNameComponent;
let fixture: ComponentFixture<MyProjectNameComponent>;
const mockMyProjectNameService = jasmine.createSpyObj('MyProjectNameService', {
sample: of([]),
});
beforeEach(waitForAsync(() => {
TestBed.configureTestingModule({
declarations: [ MyProjectNameComponent ]
})
.compileComponents();
declarations: [MyProjectNameComponent],
providers: [
{
provide: MyProjectNameService,
useValue: mockMyProjectNameService,
},
],
}).compileComponents();
}));
beforeEach(() => {

15
templates/module/angular/projects/my-project-name/src/lib/my-project-name.service.spec.ts

@ -1,12 +1,19 @@
import { TestBed } from '@angular/core/testing';
import { MyProjectNameService } from './my-project-name.service';
import { MyProjectNameService } from './services/my-project-name.service';
import { RestService } from '@abp/ng.core';
describe('MyProjectNameService', () => {
let service: MyProjectNameService;
const mockRestService = jasmine.createSpyObj('RestService', ['request']);
beforeEach(() => {
TestBed.configureTestingModule({});
TestBed.configureTestingModule({
providers: [
{
provide: RestService,
useValue: mockRestService,
},
],
});
service = TestBed.inject(MyProjectNameService);
});

2
templates/module/aspnet-core/database/Dockerfile

@ -1,4 +1,4 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build
FROM mcr.microsoft.com/dotnet/core/sdk:7.0 AS build
COPY . .
WORKDIR /templates/service/host/IdentityServerHost

4
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/Dockerfile

@ -1,8 +1,8 @@
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim AS base
FROM mcr.microsoft.com/dotnet/core/aspnet:7.0-bullseye-slim AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build
FROM mcr.microsoft.com/dotnet/core/sdk:7.0 AS build
WORKDIR /src
COPY . .
WORKDIR /src/templates/service/host/MyCompanyName.MyProjectName.AuthServer

2
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/appsettings.json

@ -5,7 +5,7 @@
},
"AppSelfUrl": "https://localhost:44301/",
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName_Main;Trusted_Connection=True"
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName_Main;Trusted_Connection=True;TrustServerCertificate=True"
},
"Redis": {
"Configuration": "127.0.0.1"

4
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/MyCompanyName.MyProjectName.Blazor.Host.csproj

@ -8,8 +8,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Blazorise.Bootstrap5" Version="1.1.1" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.1.1" />
<PackageReference Include="Blazorise.Bootstrap5" Version="1.1.2" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.1.2" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="7.0.0-rc.2.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.DevServer" Version="7.0.0-rc.2.*" />
</ItemGroup>

2447
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/wwwroot/global.css

File diff suppressed because one or more lines are too long

4
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Host/wwwroot/index.html

@ -8,7 +8,7 @@
<base href="/" />
<!--ABP:Styles-->
<link href="global.css?_v=638017042093430210" rel="stylesheet"/>
<link href="global.css?_v=638019471886531718" rel="stylesheet"/>
<link href="main.css" rel="stylesheet"/>
<!--/ABP:Styles-->
</head>
@ -22,7 +22,7 @@
</div>
<!--ABP:Scripts-->
<script src="global.js?_v=638017042094560218"></script>
<script src="global.js?_v=638019471887357617"></script>
<!--/ABP:Scripts-->
</body>
</html>

4
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/MyCompanyName.MyProjectName.Blazor.Server.Host.csproj

@ -12,8 +12,8 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Blazorise.Bootstrap5" Version="1.1.1" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.1.1" />
<PackageReference Include="Blazorise.Bootstrap5" Version="1.1.2" />
<PackageReference Include="Blazorise.Icons.FontAwesome" Version="1.1.2" />
<PackageReference Include="Serilog.AspNetCore" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.0-rc.2.*" />

2
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/appsettings.json

@ -4,6 +4,6 @@
"RedirectAllowedUrls": "https://localhost:44304"
},
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName_Unified;Trusted_Connection=True"
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName_Unified;Trusted_Connection=True;TrustServerCertificate=True"
}
}

4
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/Dockerfile

@ -1,8 +1,8 @@
FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim AS base
FROM mcr.microsoft.com/dotnet/core/aspnet:7.0-bullseye-slim AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster AS build
FROM mcr.microsoft.com/dotnet/core/sdk:7.0 AS build
WORKDIR /src
COPY . .
WORKDIR /src/templates/service/host/MyCompanyName.MyProjectName.HttpApi.Host

4
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.HttpApi.Host/appsettings.json

@ -3,8 +3,8 @@
"CorsOrigins": "https://*.MyProjectName.com,http://localhost:4200,http://localhost:44307,https://localhost:44307"
},
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName_Main;Trusted_Connection=True",
"MyProjectName": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName_Module;Trusted_Connection=True"
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName_Main;Trusted_Connection=True;TrustServerCertificate=True",
"MyProjectName": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName_Module;Trusted_Connection=True;TrustServerCertificate=True"
},
"Redis": {
"Configuration": "127.0.0.1"

2
templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/appsettings.json

@ -1,5 +1,5 @@
{
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName_Unified;Trusted_Connection=True"
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=MyProjectName_Unified;Trusted_Connection=True;TrustServerCertificate=True"
}
}

2
test/AbpPerfTest/AbpPerfTest.WithAbp/appsettings.json

@ -8,6 +8,6 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=AbpPerfTest_WithAbp;Trusted_Connection=True"
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=AbpPerfTest_WithAbp;Trusted_Connection=True;TrustServerCertificate=True"
}
}

2
test/AbpPerfTest/AbpPerfTest.WithoutAbp/appsettings.json

@ -8,6 +8,6 @@
},
"AllowedHosts": "*",
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=AbpPerfTest_WithoutAbp;Trusted_Connection=True"
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=AbpPerfTest_WithoutAbp;Trusted_Connection=True;TrustServerCertificate=True"
}
}

2
test/DistEvents/DistDemoApp.EfCoreRabbitMq/appsettings.json

@ -1,6 +1,6 @@
{
"ConnectionStrings": {
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=DistEventsDemo;Trusted_Connection=True"
"Default": "Server=(LocalDb)\\MSSQLLocalDB;Database=DistEventsDemo;Trusted_Connection=True;TrustServerCertificate=True"
},
"RabbitMQ": {
"Connections": {

Loading…
Cancel
Save