From e1f285547548371739edf5ba7ebbd35825772b51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Muhammed=20Ali=20=C3=96ZKAYA?= Date: Fri, 9 Sep 2022 09:13:50 +0300 Subject: [PATCH 01/17] Add LeptonX Lite Blazor docs --- docs/en/Themes/LeptonXLite/Blazor.md | 311 +++++++++++++++++++++++++++ 1 file changed, 311 insertions(+) diff --git a/docs/en/Themes/LeptonXLite/Blazor.md b/docs/en/Themes/LeptonXLite/Blazor.md index 636c33ef28..269abe5952 100644 --- a/docs/en/Themes/LeptonXLite/Blazor.md +++ b/docs/en/Themes/LeptonXLite/Blazor.md @@ -122,6 +122,37 @@ builder.RootComponents.Add("#ApplicationContainer"); ## Customization +### Layout + +* Create a razor page, like `MyMainLayout.razor`, in your blazor application as shown below: + +```html +@using Volo.Abp.AspNetCore.Components.Web.LeptonXLiteTheme.Themes.LeptonXLite; +@using Volo.Abp.DependencyInjection + +@inherits MainLayout +@attribute [ExposeServices(typeof(MainLayout))] +@attribute [Dependency(ReplaceServices = true)] + +@Name +``` + +* If you prefer to use a code-behind file for the C# code of your component, create a razor component, like `MyMainLayout.razor.cs`, in your blazor application as shown below: see below: + +```csharp +[ExposeServices(typeof(MainLayout))] +[Dependency(ReplaceServices = true) +namespace LeptonXLite.DemoApp.Blazor.MyComponents +{ + public partial class MyMainLayout + { + public string Name = "My Main Layout"; + } +} +``` + +> Don't forget to repeated same attributes from the razor page! + ### Toolbars LeptonX Lite includes separeted toolbars for desktop & mobile. You can manage toolbars independently. Toolbar names can be accessible in the **LeptonXLiteToolbars** class. @@ -150,3 +181,283 @@ public async Task ConfigureToolbarAsync(IToolbarConfigurationContext context) > _You can visit the [Toolbars Documentation](https://docs.abp.io/en/abp/latest/UI/Blazor/Toolbars) for better understanding._ {{end}} + +## Components + +LeptonX Blazor built on the basis of components. You can use the components in your application as you wish, or you can customize components with overriding the components. If you want to override a component please follow the steps. + +### Branding Component + +The **brand component** is a simple component that can be used to display your brand. It contains a **logo** and a **company name**. + + + +* Create a razor page, like `MyBrandingComponent.razor`, in your blazor application as shown below: + +```html +@using Volo.Abp.AspNetCore.Components.Web.LeptonXLiteTheme.Themes.LeptonXLite; +@using Volo.Abp.DependencyInjection + +@inherits Branding +@attribute [ExposeServices(typeof(Branding))] +@attribute [Dependency(ReplaceServices = true)] + +@Name +``` + +* If you prefer to use a code-behind file for the C# code of your component, create a razor component, like `MyBrandingComponent.razor.cs`, in your blazor application as shown below: see below: + +```csharp +namespace LeptonXLite.DemoApp.Blazor.MyComponents +{ + public partial class MyBrandingComponent + { + public string Name = "My Branding Component"; + } +} +``` + +### Breadcrumb Component + +On websites that have a lot of pages, **breadcrumb navigation** can greatly **enhance the way users find their way** around. In terms of **usability**, breadcrumbs reduce the number of actions a website **visitor** needs to take in order to get to a **higher-level page**, and they **improve** the **findability** of **website sections** and **pages**. + + + +* Create a razor page, like `MyBreadcrumbsComponent.razor`, in your blazor application as shown below: + +```html +@using Volo.Abp.AspNetCore.Components.Web.LeptonXLiteTheme.Themes.LeptonXLite; +@using Volo.Abp.DependencyInjection + +@inherits Breadcrumbs +@attribute [ExposeServices(typeof(Breadcrumbs))] +@attribute [Dependency(ReplaceServices = true)] + +@Name +``` + +* If you prefer to use a code-behind file for the C# code of your component, create a razor component, like `MyBreadcrumbsComponent.razor.cs`, in your blazor application as shown below: +```csharp +using Volo.Abp.AspNetCore.Components.Web.LeptonXLiteTheme.Themes.LeptonXLite; +using Volo.Abp.DependencyInjection; + +namespace LeptonXLite.DemoApp.Blazor.MyComponents +{ + [ExposeServices(typeof(Breadcrumbs))] + [Dependency(ReplaceServices = true)] + public partial class MyBreadcrumbsComponent + { + public string Name = "My Breadcrumbs Component"; + } +} +``` + +### Main Menu Component + +Sidebar menus have been used as **a directory for Related Pages** to a **Service** offering, **Navigation** items to a **specific service** or topic and even just as **Links** the user may be interested in. + + + +* Create a razor page, like `MyMainMenuComponent.razor`, in your blazor application as shown below: + +```html +@using Volo.Abp.AspNetCore.Components.Web.LeptonXLiteTheme.Themes.LeptonXLite.Navigation; +@using Volo.Abp.DependencyInjection + +@inherits MainMenu +@attribute [ExposeServices(typeof(MainMenu))] +@attribute [Dependency(ReplaceServices = true)] + +@Name +``` + +* If you prefer to use a code-behind file for the C# code of your component, create a razor component, like `MyMainMenu.razor.cs`, in your blazor application as shown below: +```csharp +using Volo.Abp.AspNetCore.Components.Web.LeptonXLiteTheme.Themes.LeptonXLite.Navigation; +using Volo.Abp.DependencyInjection; + +namespace LeptonXLite.DemoApp.Blazor.MyComponents +{ + [ExposeServices(typeof(MainMenu))] + [Dependency(ReplaceServices = true)] + public partial class MainMenu + { + public string Name = "My Main Menu Component"; + } +} +``` + +> The **main menu** renders menu items **dynamic**. The **menu item** is a **razor component** named `MainMenuItem.razor.cs` in the same namespace with **main menu** and you can **override it** like main menu. + +### Toolbar Items Component + +Toolbar items are used to add **extra functionality to the toolbar**. The toolbar is a **horizontal bar** that **contains** a group of **toolbar items**. + +* Create a razor page, like `MyToolbarItemsComponent.razor`, in your blazor application as shown below: + +```html +@using Volo.Abp.AspNetCore.Components.Web.LeptonXLiteTheme.Themes.LeptonXLite; +@using Volo.Abp.DependencyInjection + +@inherits ToolbarItemsComponent +@attribute [ExposeServices(typeof(ToolbarItemsComponent))] +@attribute [Dependency(ReplaceServices = true)] + +@Name +``` + +* If you prefer to use a code-behind file for the C# code of your component, create a razor component, like `MyToolbarItemsComponent.razor.cs`, in your blazor application as shown below: +```csharp +using Volo.Abp.AspNetCore.Components.Web.LeptonXLiteTheme.Themes.LeptonXLite; +using Volo.Abp.DependencyInjection; + +namespace LeptonXLite.DemoApp.Blazor.MyComponents +{ + [ExposeServices(typeof(ToolbarItemsComponent))] + [Dependency(ReplaceServices = true)] + public partial class MyToolbarItemsComponent + { + public string Name = "My Toolbar Items Component"; + } +} +``` + +### Language Switch Component + +Think about a **multi-lingual** website and the first thing that could **hit your mind** is **the language switch component**. A **navigation bar** is a **great place** to **embed a language switch**. By embedding the language switch in the navigation bar of your website, you would **make it simpler** for users to **find it** and **easily** switch the **language** **without trying to locate it across the website.** + + + +* Create a razor page, like `MyLanguageSwitchComponent.razor`, in your blazor application as shown below: + +```html +@using Volo.Abp.AspNetCore.Components.Web.LeptonXLiteTheme.Themes.LeptonXLite.Toolbar; +@using Volo.Abp.DependencyInjection + +@inherits LanguageSwitchComponent +@attribute [ExposeServices(typeof(LanguageSwitchComponent))] +@attribute [Dependency(ReplaceServices = true)] + +@Name +``` + +* If you prefer to use a code-behind file for the C# code of your component, create a razor component, like `MyLanguageSwitchComponent.razor.cs`, in your blazor application as shown below: +```csharp +using Volo.Abp.AspNetCore.Components.Web.LeptonXLiteTheme.Themes.LeptonXLite.Toolbar; +using Volo.Abp.DependencyInjection; + +namespace LeptonXLite.DemoApp.Blazor.MyComponents +{ + [ExposeServices(typeof(LanguageSwitchComponent))] + [Dependency(ReplaceServices = true)] + public partial class MyLanguageSwitchComponent + { + public string Name = "My Language Switch Component"; + } +} +``` + +### Mobile Language Switch Component + +The **mobile** **language switch component** is used to switch the language of the website **on mobile devices**. The mobile language switch component is a **dropdown menu** that **contains all the languages** of the website. + + + +* Create a razor page, like `MyMobilLanguageSwitchComponent.razor`, in your blazor application as shown below: + +```html +@using Volo.Abp.AspNetCore.Components.Web.LeptonXLiteTheme.Themes.LeptonXLite.Toolbar; +@using Volo.Abp.DependencyInjection + +@inherits MobilLanguageSwitchComponent +@attribute [ExposeServices(typeof(MobilLanguageSwitchComponent))] +@attribute [Dependency(ReplaceServices = true)] + +@Name +``` + +* If you prefer to use a code-behind file for the C# code of your component, create a razor component, like `MyMobilLanguageSwitchComponent.razor.cs`, in your blazor application as shown below: +```csharp +using Volo.Abp.AspNetCore.Components.Web.LeptonXLiteTheme.Themes.LeptonXLite.Toolbar; +using Volo.Abp.DependencyInjection; + +namespace LeptonXLite.DemoApp.Blazor.MyComponents +{ + [ExposeServices(typeof(MobilLanguageSwitchComponent))] + [Dependency(ReplaceServices = true)] + public partial class MyMobilLanguageSwitchComponent + { + public string Name = "My Mobil Language Switch Component"; + } +} +``` + +### User Menu Component + +The **User Menu** is the **menu** that **drops down** when you **click your name** or **profile picture** in the **upper right corner** of your page (**in the toolbar**). It drops down options such as **Settings**, **Logout**, etc. + + + +* Create a razor page, like `MyUserMenuComponent.razor`, in your blazor application as shown below: + +```html +@using Volo.Abp.AspNetCore.Components.Server.LeptonXLiteTheme.Themes.LeptonXLite.Toolbar; +@using Volo.Abp.DependencyInjection + +@inherits MobilLanguageSwitchComponent +@attribute [ExposeServices(typeof(MobilLanguageSwitchComponent))] +@attribute [Dependency(ReplaceServices = true)] + +@Name +``` + +* If you prefer to use a code-behind file for the C# code of your component, create a razor component, like `MyUserMenuComponent.razor.cs`, in your blazor application as shown below: +```csharp +using Volo.Abp.AspNetCore.Components.Server.LeptonXLiteTheme.Themes.LeptonXLite.Toolbar; +using Volo.Abp.DependencyInjection; + +namespace LeptonXLite.DemoApp.Blazor.MyComponents +{ + [ExposeServices(typeof(UserMenuComponent))] + [Dependency(ReplaceServices = true)] + public partial class MyUserMenuComponent + { + public string Name = "My User Menu Component"; + } +} +``` + +### Mobile User Menu Component + +The **mobile user menu component** is used to display the **user menu on mobile devices**. The mobile user menu component is a **dropdown menu** that contains all the **options** of the **user menu**. + + + +* Create a razor page, like `MyMobileUserMenuComponent.razor`, in your blazor application as shown below: + +```html +@using Volo.Abp.AspNetCore.Components.Server.LeptonXLiteTheme.Themes.LeptonXLite.Toolbar; +@using Volo.Abp.DependencyInjection + +@inherits MobilUserMenuComponent +@attribute [ExposeServices(typeof(MobilUserMenuComponent))] +@attribute [Dependency(ReplaceServices = true)] + +@Name +``` + +* If you prefer to use a code-behind file for the C# code of your component, create a razor component, like `MyMobileUserMenuComponent.razor.cs`, in your blazor application as shown below: +```csharp +using Volo.Abp.AspNetCore.Components.Server.LeptonXLiteTheme.Themes.LeptonXLite.Toolbar; +using Volo.Abp.DependencyInjection; + +namespace LeptonXLite.DemoApp.Blazor.MyComponents +{ + [ExposeServices(typeof(MobileUserMenuComponent))] + [Dependency(ReplaceServices = true)] + public partial class MyMobileUserMenuComponent + { + public string Name = "My Mobile User Menu Component"; + } +} +``` From 197fdce8c9d2ca68c375fd62c907c6b8e704539e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Muhammed=20Ali=20=C3=96ZKAYA?= Date: Fri, 9 Sep 2022 10:11:52 +0300 Subject: [PATCH 02/17] Refactor LeptonX Lite Blazor docs --- docs/en/Themes/LeptonXLite/Blazor.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/en/Themes/LeptonXLite/Blazor.md b/docs/en/Themes/LeptonXLite/Blazor.md index 269abe5952..9cbb81ea38 100644 --- a/docs/en/Themes/LeptonXLite/Blazor.md +++ b/docs/en/Themes/LeptonXLite/Blazor.md @@ -192,6 +192,8 @@ The **brand component** is a simple component that can be used to display your b +#### How to Override Branding Component + * Create a razor page, like `MyBrandingComponent.razor`, in your blazor application as shown below: ```html @@ -223,6 +225,8 @@ On websites that have a lot of pages, **breadcrumb navigation** can greatly **en +#### How to Override BreadCrumb Component + * Create a razor page, like `MyBreadcrumbsComponent.razor`, in your blazor application as shown below: ```html @@ -258,6 +262,8 @@ Sidebar menus have been used as **a directory for Related Pages** to a **Service +#### How to Override Main Menu Component + * Create a razor page, like `MyMainMenuComponent.razor`, in your blazor application as shown below: ```html @@ -293,6 +299,8 @@ namespace LeptonXLite.DemoApp.Blazor.MyComponents Toolbar items are used to add **extra functionality to the toolbar**. The toolbar is a **horizontal bar** that **contains** a group of **toolbar items**. +#### How to Override Toolbar Items Component + * Create a razor page, like `MyToolbarItemsComponent.razor`, in your blazor application as shown below: ```html @@ -328,6 +336,8 @@ Think about a **multi-lingual** website and the first thing that could **hit you +#### How to Override Language Switch Component + * Create a razor page, like `MyLanguageSwitchComponent.razor`, in your blazor application as shown below: ```html @@ -363,6 +373,8 @@ The **mobile** **language switch component** is used to switch the language of t +#### How to Override Mobile Language Switch Component + * Create a razor page, like `MyMobilLanguageSwitchComponent.razor`, in your blazor application as shown below: ```html @@ -398,6 +410,8 @@ The **User Menu** is the **menu** that **drops down** when you **click your name +#### How to Override User Menu Component + * Create a razor page, like `MyUserMenuComponent.razor`, in your blazor application as shown below: ```html @@ -433,6 +447,8 @@ The **mobile user menu component** is used to display the **user menu on mobile +#### How to override the Mobile User Menu Component + * Create a razor page, like `MyMobileUserMenuComponent.razor`, in your blazor application as shown below: ```html From 1c3ef4f05f51d32adcabe228ef379b03c2adff0c Mon Sep 17 00:00:00 2001 From: maliming Date: Fri, 9 Sep 2022 17:34:28 +0800 Subject: [PATCH 03/17] Disable dynamic permissions and features during migration. --- .../Program.cs | 16 ++++++++++++++++ .../Program.cs | 16 ++++++++++++++++ .../Program.cs | 16 ++++++++++++++++ .../Program.cs | 16 ++++++++++++++++ .../Program.cs | 16 ++++++++++++++++ .../Program.cs | 16 ++++++++++++++++ .../MyProjectNameDbMigratorModule.cs | 19 ++++++++++++++++++- 7 files changed, 114 insertions(+), 1 deletion(-) diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/Program.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/Program.cs index d922551429..d4139fb375 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/Program.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/Program.cs @@ -2,6 +2,8 @@ using MyCompanyName.MyProjectName.Blazor.Server; using MyCompanyName.MyProjectName.Data; using Serilog; using Serilog.Events; +using Volo.Abp.FeatureManagement; +using Volo.Abp.PermissionManagement; namespace MyCompanyName.MyProjectName; @@ -36,6 +38,20 @@ public class Program .UseAutofac() .UseSerilog(); await builder.AddApplicationAsync(); + if (IsMigrateDatabase(args)) + { + builder.Services.Configure(options => + { + options.IsDynamicPermissionStoreEnabled = false; + options.SaveStaticPermissionsToDatabase = false; + }); + + builder.Services.Configure(options => + { + options.IsDynamicFeatureStoreEnabled = false; + options.SaveStaticFeaturesToDatabase = false; + }); + } var app = builder.Build(); await app.InitializeApplicationAsync(); diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Program.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Program.cs index 8787d01b8e..033e0df78b 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Program.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Program.cs @@ -3,6 +3,8 @@ using MyCompanyName.MyProjectName.Blazor.Server; using MyCompanyName.MyProjectName.Data; using Serilog; using Serilog.Events; +using Volo.Abp.FeatureManagement; +using Volo.Abp.PermissionManagement; namespace MyCompanyName.MyProjectName; @@ -42,6 +44,20 @@ public class Program .UseAutofac() .UseSerilog(); await builder.AddApplicationAsync(); + if (IsMigrateDatabase(args)) + { + builder.Services.Configure(options => + { + options.IsDynamicPermissionStoreEnabled = false; + options.SaveStaticPermissionsToDatabase = false; + }); + + builder.Services.Configure(options => + { + options.IsDynamicFeatureStoreEnabled = false; + options.SaveStaticFeaturesToDatabase = false; + }); + } var app = builder.Build(); await app.InitializeApplicationAsync(); diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/Program.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/Program.cs index d09fba6395..5fafe94bc9 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/Program.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/Program.cs @@ -1,6 +1,8 @@ using MyCompanyName.MyProjectName.Data; using Serilog; using Serilog.Events; +using Volo.Abp.FeatureManagement; +using Volo.Abp.PermissionManagement; namespace MyCompanyName.MyProjectName; @@ -35,6 +37,20 @@ public class Program .UseAutofac() .UseSerilog(); await builder.AddApplicationAsync(); + if (IsMigrateDatabase(args)) + { + builder.Services.Configure(options => + { + options.IsDynamicPermissionStoreEnabled = false; + options.SaveStaticPermissionsToDatabase = false; + }); + + builder.Services.Configure(options => + { + options.IsDynamicFeatureStoreEnabled = false; + options.SaveStaticFeaturesToDatabase = false; + }); + } var app = builder.Build(); await app.InitializeApplicationAsync(); diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Program.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Program.cs index c762c9b245..158edc894d 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Program.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Program.cs @@ -2,6 +2,8 @@ using System; using MyCompanyName.MyProjectName.Data; using Serilog; using Serilog.Events; +using Volo.Abp.FeatureManagement; +using Volo.Abp.PermissionManagement; namespace MyCompanyName.MyProjectName; @@ -41,6 +43,20 @@ public class Program .UseAutofac() .UseSerilog(); await builder.AddApplicationAsync(); + if (IsMigrateDatabase(args)) + { + builder.Services.Configure(options => + { + options.IsDynamicPermissionStoreEnabled = false; + options.SaveStaticPermissionsToDatabase = false; + }); + + builder.Services.Configure(options => + { + options.IsDynamicFeatureStoreEnabled = false; + options.SaveStaticFeaturesToDatabase = false; + }); + } var app = builder.Build(); await app.InitializeApplicationAsync(); diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/Program.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/Program.cs index ac3634377d..d8529fffec 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/Program.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/Program.cs @@ -1,6 +1,8 @@ using MyCompanyName.MyProjectName.Data; using Serilog; using Serilog.Events; +using Volo.Abp.FeatureManagement; +using Volo.Abp.PermissionManagement; namespace MyCompanyName.MyProjectName; @@ -36,6 +38,20 @@ public class Program .UseAutofac() .UseSerilog(); await builder.AddApplicationAsync(); + if (IsMigrateDatabase(args)) + { + builder.Services.Configure(options => + { + options.IsDynamicPermissionStoreEnabled = false; + options.SaveStaticPermissionsToDatabase = false; + }); + + builder.Services.Configure(options => + { + options.IsDynamicFeatureStoreEnabled = false; + options.SaveStaticFeaturesToDatabase = false; + }); + } var app = builder.Build(); await app.InitializeApplicationAsync(); diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Program.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Program.cs index 8a6393168c..90d099439f 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Program.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Program.cs @@ -2,6 +2,8 @@ using System; using MyCompanyName.MyProjectName.Data; using Serilog; using Serilog.Events; +using Volo.Abp.FeatureManagement; +using Volo.Abp.PermissionManagement; namespace MyCompanyName.MyProjectName; @@ -42,6 +44,20 @@ public class Program .UseAutofac() .UseSerilog(); await builder.AddApplicationAsync(); + if (IsMigrateDatabase(args)) + { + builder.Services.Configure(options => + { + options.IsDynamicPermissionStoreEnabled = false; + options.SaveStaticPermissionsToDatabase = false; + }); + + builder.Services.Configure(options => + { + options.IsDynamicFeatureStoreEnabled = false; + options.SaveStaticFeaturesToDatabase = false; + }); + } var app = builder.Build(); await app.InitializeApplicationAsync(); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/MyProjectNameDbMigratorModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/MyProjectNameDbMigratorModule.cs index 51bc87cd52..f0c746f0aa 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/MyProjectNameDbMigratorModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/MyProjectNameDbMigratorModule.cs @@ -1,7 +1,9 @@ using MyCompanyName.MyProjectName.EntityFrameworkCore; using Volo.Abp.Autofac; using Volo.Abp.BackgroundJobs; +using Volo.Abp.FeatureManagement; using Volo.Abp.Modularity; +using Volo.Abp.PermissionManagement; namespace MyCompanyName.MyProjectName.DbMigrator; @@ -14,6 +16,21 @@ public class MyProjectNameDbMigratorModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - Configure(options => options.IsJobExecutionEnabled = false); + Configure(options => + { + options.IsJobExecutionEnabled = false; + }); + + Configure(options => + { + options.IsDynamicPermissionStoreEnabled = false; + options.SaveStaticPermissionsToDatabase = false; + }); + + Configure(options => + { + options.IsDynamicFeatureStoreEnabled = false; + options.SaveStaticFeaturesToDatabase = false; + }); } } From b23ff355c8f262ed3df43853f614c0cffe4e9be3 Mon Sep 17 00:00:00 2001 From: maliming Date: Sun, 11 Sep 2022 10:39:50 +0800 Subject: [PATCH 04/17] Using Migration Environment. --- .../BackgroundJobs/AbpBackgroundJobsModule.cs | 7 ++-- .../Abp/Data/AbpDataMigrationEnvironment.cs | 6 +++ .../AbpDataMigrationEnvironmentExtensions.cs | 38 +++++++++++++++++++ .../AbpFeatureManagementDomainModule.cs | 6 +++ .../AbpPermissionManagementDomainModule.cs | 6 +++ .../Program.cs | 16 +------- .../Program.cs | 17 +-------- .../Program.cs | 15 +------- .../Program.cs | 16 +------- .../Program.cs | 16 +------- .../Program.cs | 17 +-------- .../DbMigratorHostedService.cs | 2 + .../MyProjectNameDbMigratorModule.cs | 21 ---------- 13 files changed, 74 insertions(+), 109 deletions(-) create mode 100644 framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataMigrationEnvironment.cs create mode 100644 framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataMigrationEnvironmentExtensions.cs diff --git a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs index 6c09a80f73..1c8daf3f82 100644 --- a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs +++ b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs @@ -2,6 +2,7 @@ using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.Options; using Volo.Abp.BackgroundWorkers; +using Volo.Abp.Data; using Volo.Abp.DistributedLocking; using Volo.Abp.Guids; using Volo.Abp.Modularity; @@ -19,10 +20,10 @@ namespace Volo.Abp.BackgroundJobs; )] public class AbpBackgroundJobsModule : AbpModule { - public async override Task OnApplicationInitializationAsync(ApplicationInitializationContext context) + public override async Task OnApplicationInitializationAsync(ApplicationInitializationContext context) { - var options = context.ServiceProvider.GetRequiredService>().Value; - if (options.IsJobExecutionEnabled) + if (!context.ServiceProvider.IsMigrationEnvironment() && + context.ServiceProvider.GetRequiredService>().Value.IsJobExecutionEnabled) { await context.AddBackgroundWorkerAsync(); } diff --git a/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataMigrationEnvironment.cs b/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataMigrationEnvironment.cs new file mode 100644 index 0000000000..cdbdf13eb0 --- /dev/null +++ b/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataMigrationEnvironment.cs @@ -0,0 +1,6 @@ +namespace Volo.Abp.Data; + +public class AbpDataMigrationEnvironment +{ + +} diff --git a/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataMigrationEnvironmentExtensions.cs b/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataMigrationEnvironmentExtensions.cs new file mode 100644 index 0000000000..050ee2127e --- /dev/null +++ b/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataMigrationEnvironmentExtensions.cs @@ -0,0 +1,38 @@ +using System; +using Microsoft.Extensions.DependencyInjection; +using Volo.Abp.DependencyInjection; + +namespace Volo.Abp.Data; + +public static class AbpDataMigrationEnvironmentExtensions +{ + public static void AddMigrationEnvironment(this AbpApplicationCreationOptions options, AbpDataMigrationEnvironment environment = null) + { + options.Services.AddMigrationEnvironment(environment ?? new AbpDataMigrationEnvironment()); + } + + public static void AddMigrationEnvironment(this IServiceCollection services, AbpDataMigrationEnvironment environment = null) + { + services.AddObjectAccessor(environment ?? new AbpDataMigrationEnvironment()); + } + + public static AbpDataMigrationEnvironment GetMigrationEnvironment(this IServiceCollection services) + { + return services.GetObjectOrNull>()?.Value; + } + + public static bool IsMigrationEnvironment(this IServiceCollection services) + { + return services.GetMigrationEnvironment() != null; + } + + public static AbpDataMigrationEnvironment GetMigrationEnvironment(this IServiceProvider serviceProvider) + { + return serviceProvider.GetService>()?.Value; + } + + public static bool IsMigrationEnvironment(this IServiceProvider serviceProvider) + { + return serviceProvider.GetMigrationEnvironment() != null; + } +} diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainModule.cs index 74cd00cffb..015df09cdc 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainModule.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainModule.cs @@ -7,6 +7,7 @@ using Microsoft.Extensions.Logging; using Microsoft.Extensions.Options; using Polly; using Volo.Abp.Caching; +using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.FeatureManagement.Localization; using Volo.Abp.Features; @@ -62,6 +63,11 @@ public class AbpFeatureManagementDomainModule : AbpModule private void InitializeDynamicFeatures(ApplicationInitializationContext context) { + if (context.ServiceProvider.IsMigrationEnvironment()) + { + return; + } + var options = context .ServiceProvider .GetRequiredService>() diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/AbpPermissionManagementDomainModule.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/AbpPermissionManagementDomainModule.cs index ddf5be479e..67c438582e 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/AbpPermissionManagementDomainModule.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/AbpPermissionManagementDomainModule.cs @@ -9,6 +9,7 @@ using Polly; using Volo.Abp.Authorization; using Volo.Abp.Authorization.Permissions; using Volo.Abp.Caching; +using Volo.Abp.Data; using Volo.Abp.DependencyInjection; using Volo.Abp.Domain; using Volo.Abp.Json; @@ -45,6 +46,11 @@ public class AbpPermissionManagementDomainModule : AbpModule private void InitializeDynamicPermissions(ApplicationInitializationContext context) { + if (context.ServiceProvider.IsMigrationEnvironment()) + { + return; + } + var options = context .ServiceProvider .GetRequiredService>() diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/Program.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/Program.cs index d4139fb375..36ef778848 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/Program.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/Program.cs @@ -1,9 +1,7 @@ -using MyCompanyName.MyProjectName.Blazor.Server; using MyCompanyName.MyProjectName.Data; using Serilog; using Serilog.Events; -using Volo.Abp.FeatureManagement; -using Volo.Abp.PermissionManagement; +using Volo.Abp.Data; namespace MyCompanyName.MyProjectName; @@ -40,17 +38,7 @@ public class Program await builder.AddApplicationAsync(); if (IsMigrateDatabase(args)) { - builder.Services.Configure(options => - { - options.IsDynamicPermissionStoreEnabled = false; - options.SaveStaticPermissionsToDatabase = false; - }); - - builder.Services.Configure(options => - { - options.IsDynamicFeatureStoreEnabled = false; - options.SaveStaticFeaturesToDatabase = false; - }); + builder.Services.AddMigrationEnvironment(); } var app = builder.Build(); await app.InitializeApplicationAsync(); diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Program.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Program.cs index 033e0df78b..542b860add 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Program.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Program.cs @@ -1,10 +1,7 @@ -using System; -using MyCompanyName.MyProjectName.Blazor.Server; using MyCompanyName.MyProjectName.Data; using Serilog; using Serilog.Events; -using Volo.Abp.FeatureManagement; -using Volo.Abp.PermissionManagement; +using Volo.Abp.Data; namespace MyCompanyName.MyProjectName; @@ -46,17 +43,7 @@ public class Program await builder.AddApplicationAsync(); if (IsMigrateDatabase(args)) { - builder.Services.Configure(options => - { - options.IsDynamicPermissionStoreEnabled = false; - options.SaveStaticPermissionsToDatabase = false; - }); - - builder.Services.Configure(options => - { - options.IsDynamicFeatureStoreEnabled = false; - options.SaveStaticFeaturesToDatabase = false; - }); + builder.Services.AddMigrationEnvironment(); } var app = builder.Build(); await app.InitializeApplicationAsync(); diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/Program.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/Program.cs index 5fafe94bc9..36ef778848 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/Program.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/Program.cs @@ -1,8 +1,7 @@ using MyCompanyName.MyProjectName.Data; using Serilog; using Serilog.Events; -using Volo.Abp.FeatureManagement; -using Volo.Abp.PermissionManagement; +using Volo.Abp.Data; namespace MyCompanyName.MyProjectName; @@ -39,17 +38,7 @@ public class Program await builder.AddApplicationAsync(); if (IsMigrateDatabase(args)) { - builder.Services.Configure(options => - { - options.IsDynamicPermissionStoreEnabled = false; - options.SaveStaticPermissionsToDatabase = false; - }); - - builder.Services.Configure(options => - { - options.IsDynamicFeatureStoreEnabled = false; - options.SaveStaticFeaturesToDatabase = false; - }); + builder.Services.AddMigrationEnvironment(); } var app = builder.Build(); await app.InitializeApplicationAsync(); diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Program.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Program.cs index 158edc894d..542b860add 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Program.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Program.cs @@ -1,9 +1,7 @@ -using System; using MyCompanyName.MyProjectName.Data; using Serilog; using Serilog.Events; -using Volo.Abp.FeatureManagement; -using Volo.Abp.PermissionManagement; +using Volo.Abp.Data; namespace MyCompanyName.MyProjectName; @@ -45,17 +43,7 @@ public class Program await builder.AddApplicationAsync(); if (IsMigrateDatabase(args)) { - builder.Services.Configure(options => - { - options.IsDynamicPermissionStoreEnabled = false; - options.SaveStaticPermissionsToDatabase = false; - }); - - builder.Services.Configure(options => - { - options.IsDynamicFeatureStoreEnabled = false; - options.SaveStaticFeaturesToDatabase = false; - }); + builder.Services.AddMigrationEnvironment(); } var app = builder.Build(); await app.InitializeApplicationAsync(); diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/Program.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/Program.cs index d8529fffec..36ef778848 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/Program.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/Program.cs @@ -1,9 +1,7 @@ using MyCompanyName.MyProjectName.Data; using Serilog; using Serilog.Events; -using Volo.Abp.FeatureManagement; -using Volo.Abp.PermissionManagement; - +using Volo.Abp.Data; namespace MyCompanyName.MyProjectName; @@ -40,17 +38,7 @@ public class Program await builder.AddApplicationAsync(); if (IsMigrateDatabase(args)) { - builder.Services.Configure(options => - { - options.IsDynamicPermissionStoreEnabled = false; - options.SaveStaticPermissionsToDatabase = false; - }); - - builder.Services.Configure(options => - { - options.IsDynamicFeatureStoreEnabled = false; - options.SaveStaticFeaturesToDatabase = false; - }); + builder.Services.AddMigrationEnvironment(); } var app = builder.Build(); await app.InitializeApplicationAsync(); diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Program.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Program.cs index 90d099439f..542b860add 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Program.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Program.cs @@ -1,10 +1,7 @@ -using System; using MyCompanyName.MyProjectName.Data; using Serilog; using Serilog.Events; -using Volo.Abp.FeatureManagement; -using Volo.Abp.PermissionManagement; - +using Volo.Abp.Data; namespace MyCompanyName.MyProjectName; @@ -46,17 +43,7 @@ public class Program await builder.AddApplicationAsync(); if (IsMigrateDatabase(args)) { - builder.Services.Configure(options => - { - options.IsDynamicPermissionStoreEnabled = false; - options.SaveStaticPermissionsToDatabase = false; - }); - - builder.Services.Configure(options => - { - options.IsDynamicFeatureStoreEnabled = false; - options.SaveStaticFeaturesToDatabase = false; - }); + builder.Services.AddMigrationEnvironment(); } var app = builder.Build(); await app.InitializeApplicationAsync(); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/DbMigratorHostedService.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/DbMigratorHostedService.cs index 0b31a64ddd..827bd31505 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/DbMigratorHostedService.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/DbMigratorHostedService.cs @@ -6,6 +6,7 @@ using Microsoft.Extensions.Hosting; using MyCompanyName.MyProjectName.Data; using Serilog; using Volo.Abp; +using Volo.Abp.Data; namespace MyCompanyName.MyProjectName.DbMigrator; @@ -27,6 +28,7 @@ public class DbMigratorHostedService : IHostedService options.Services.ReplaceConfiguration(_configuration); options.UseAutofac(); options.Services.AddLogging(c => c.AddSerilog()); + options.AddMigrationEnvironment(); })) { await application.InitializeAsync(); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/MyProjectNameDbMigratorModule.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/MyProjectNameDbMigratorModule.cs index f0c746f0aa..06c4b3d1b5 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/MyProjectNameDbMigratorModule.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/MyProjectNameDbMigratorModule.cs @@ -1,9 +1,6 @@ using MyCompanyName.MyProjectName.EntityFrameworkCore; using Volo.Abp.Autofac; -using Volo.Abp.BackgroundJobs; -using Volo.Abp.FeatureManagement; using Volo.Abp.Modularity; -using Volo.Abp.PermissionManagement; namespace MyCompanyName.MyProjectName.DbMigrator; @@ -14,23 +11,5 @@ namespace MyCompanyName.MyProjectName.DbMigrator; )] public class MyProjectNameDbMigratorModule : AbpModule { - public override void ConfigureServices(ServiceConfigurationContext context) - { - Configure(options => - { - options.IsJobExecutionEnabled = false; - }); - Configure(options => - { - options.IsDynamicPermissionStoreEnabled = false; - options.SaveStaticPermissionsToDatabase = false; - }); - - Configure(options => - { - options.IsDynamicFeatureStoreEnabled = false; - options.SaveStaticFeaturesToDatabase = false; - }); - } } From ae59cec161239f6bddc7ca32f2f6786936c6e8af Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 13 Sep 2022 09:40:18 +0800 Subject: [PATCH 05/17] Update `MaxValueTypeLength` to 2048. --- .../Abp/FeatureManagement/FeatureDefinitionRecordConsts.cs | 2 +- ...itial.Designer.cs => 20220913013927_Initial.Designer.cs} | 6 +++--- ...{20220909024045_Initial.cs => 20220913013927_Initial.cs} | 2 +- .../Migrations/MyProjectNameDbContextModelSnapshot.cs | 4 ++-- ...itial.Designer.cs => 20220913013918_Initial.Designer.cs} | 6 +++--- ...{20220909024045_Initial.cs => 20220913013918_Initial.cs} | 2 +- .../Migrations/MyProjectNameDbContextModelSnapshot.cs | 4 ++-- ...itial.Designer.cs => 20220913013911_Initial.Designer.cs} | 6 +++--- ...{20220909024056_Initial.cs => 20220913013911_Initial.cs} | 2 +- .../Migrations/MyProjectNameDbContextModelSnapshot.cs | 4 ++-- ...itial.Designer.cs => 20220913013531_Initial.Designer.cs} | 6 +++--- ...{20220909023853_Initial.cs => 20220913013531_Initial.cs} | 2 +- .../Migrations/MyProjectNameDbContextModelSnapshot.cs | 4 ++-- ...itial.Designer.cs => 20220913013849_Initial.Designer.cs} | 6 +++--- ...{20220909024101_Initial.cs => 20220913013849_Initial.cs} | 2 +- .../Migrations/AuthServerDbContextModelSnapshot.cs | 4 ++-- ...itial.Designer.cs => 20220913013738_Initial.Designer.cs} | 6 +++--- ...{20220909024110_Initial.cs => 20220913013738_Initial.cs} | 2 +- .../Migrations/UnifiedDbContextModelSnapshot.cs | 4 ++-- ...itial.Designer.cs => 20220913013700_Initial.Designer.cs} | 6 +++--- ...{20220909024111_Initial.cs => 20220913013700_Initial.cs} | 2 +- .../Migrations/UnifiedDbContextModelSnapshot.cs | 4 ++-- 22 files changed, 43 insertions(+), 43 deletions(-) rename templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Migrations/{20220909024045_Initial.Designer.cs => 20220913013927_Initial.Designer.cs} (99%) rename templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Migrations/{20220909024045_Initial.cs => 20220913013927_Initial.cs} (99%) rename templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Migrations/{20220909024045_Initial.Designer.cs => 20220913013918_Initial.Designer.cs} (99%) rename templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Migrations/{20220909024045_Initial.cs => 20220913013918_Initial.cs} (99%) rename templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Migrations/{20220909024056_Initial.Designer.cs => 20220913013911_Initial.Designer.cs} (99%) rename templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Migrations/{20220909024056_Initial.cs => 20220913013911_Initial.cs} (99%) rename templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/{20220909023853_Initial.Designer.cs => 20220913013531_Initial.Designer.cs} (99%) rename templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/{20220909023853_Initial.cs => 20220913013531_Initial.cs} (99%) rename templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/Migrations/{20220909024101_Initial.Designer.cs => 20220913013849_Initial.Designer.cs} (99%) rename templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/Migrations/{20220909024101_Initial.cs => 20220913013849_Initial.cs} (99%) rename templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/{20220909024110_Initial.Designer.cs => 20220913013738_Initial.Designer.cs} (99%) rename templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/{20220909024110_Initial.cs => 20220913013738_Initial.cs} (99%) rename templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/{20220909024111_Initial.Designer.cs => 20220913013700_Initial.Designer.cs} (99%) rename templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/{20220909024111_Initial.cs => 20220913013700_Initial.cs} (99%) diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/FeatureDefinitionRecordConsts.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/FeatureDefinitionRecordConsts.cs index 4088424774..9248cf5c59 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/FeatureDefinitionRecordConsts.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo/Abp/FeatureManagement/FeatureDefinitionRecordConsts.cs @@ -12,5 +12,5 @@ public static class FeatureDefinitionRecordConsts public static int MaxAllowedProvidersLength { get; set; } = 256; - public static int MaxValueTypeLength { get; set; } = 256; + public static int MaxValueTypeLength { get; set; } = 2048; } diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Migrations/20220909024045_Initial.Designer.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Migrations/20220913013927_Initial.Designer.cs similarity index 99% rename from templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Migrations/20220909024045_Initial.Designer.cs rename to templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Migrations/20220913013927_Initial.Designer.cs index df15aa6039..2a8eeb5c4c 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Migrations/20220909024045_Initial.Designer.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Migrations/20220913013927_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace MyCompanyName.MyProjectName.Blazor.Server.Migrations { [DbContext(typeof(MyProjectNameDbContext))] - [Migration("20220909024045_Initial")] + [Migration("20220913013927_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -336,8 +336,8 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Migrations .HasColumnType("nvarchar(128)"); b.Property("ValueType") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Migrations/20220909024045_Initial.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Migrations/20220913013927_Initial.cs similarity index 99% rename from templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Migrations/20220909024045_Initial.cs rename to templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Migrations/20220913013927_Initial.cs index ca557a6dd9..2f17d2eeba 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Migrations/20220909024045_Initial.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Migrations/20220913013927_Initial.cs @@ -91,7 +91,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Migrations IsVisibleToClients = table.Column(type: "bit", nullable: false), IsAvailableToHost = table.Column(type: "bit", nullable: false), AllowedProviders = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - ValueType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + ValueType = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: true), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Migrations/MyProjectNameDbContextModelSnapshot.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Migrations/MyProjectNameDbContextModelSnapshot.cs index f9724b5b3d..4df66c04ca 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Migrations/MyProjectNameDbContextModelSnapshot.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Migrations/MyProjectNameDbContextModelSnapshot.cs @@ -334,8 +334,8 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Migrations .HasColumnType("nvarchar(128)"); b.Property("ValueType") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Migrations/20220909024045_Initial.Designer.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Migrations/20220913013918_Initial.Designer.cs similarity index 99% rename from templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Migrations/20220909024045_Initial.Designer.cs rename to templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Migrations/20220913013918_Initial.Designer.cs index a0c10f22eb..bc2a256ed3 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Migrations/20220909024045_Initial.Designer.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Migrations/20220913013918_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace MyCompanyName.MyProjectName.Host.Migrations { [DbContext(typeof(MyProjectNameDbContext))] - [Migration("20220909024045_Initial")] + [Migration("20220913013918_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -336,8 +336,8 @@ namespace MyCompanyName.MyProjectName.Host.Migrations .HasColumnType("nvarchar(128)"); b.Property("ValueType") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Migrations/20220909024045_Initial.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Migrations/20220913013918_Initial.cs similarity index 99% rename from templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Migrations/20220909024045_Initial.cs rename to templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Migrations/20220913013918_Initial.cs index f1520c0873..d34c67552d 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Migrations/20220909024045_Initial.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Migrations/20220913013918_Initial.cs @@ -91,7 +91,7 @@ namespace MyCompanyName.MyProjectName.Host.Migrations IsVisibleToClients = table.Column(type: "bit", nullable: false), IsAvailableToHost = table.Column(type: "bit", nullable: false), AllowedProviders = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - ValueType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + ValueType = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: true), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Migrations/MyProjectNameDbContextModelSnapshot.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Migrations/MyProjectNameDbContextModelSnapshot.cs index 48c632be62..b4acd389c1 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Migrations/MyProjectNameDbContextModelSnapshot.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Migrations/MyProjectNameDbContextModelSnapshot.cs @@ -334,8 +334,8 @@ namespace MyCompanyName.MyProjectName.Host.Migrations .HasColumnType("nvarchar(128)"); b.Property("ValueType") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Migrations/20220909024056_Initial.Designer.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Migrations/20220913013911_Initial.Designer.cs similarity index 99% rename from templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Migrations/20220909024056_Initial.Designer.cs rename to templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Migrations/20220913013911_Initial.Designer.cs index c059bb8caa..2cbf8a2a3c 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Migrations/20220909024056_Initial.Designer.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Migrations/20220913013911_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace MyCompanyName.MyProjectName.Mvc.Migrations { [DbContext(typeof(MyProjectNameDbContext))] - [Migration("20220909024056_Initial")] + [Migration("20220913013911_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -336,8 +336,8 @@ namespace MyCompanyName.MyProjectName.Mvc.Migrations .HasColumnType("nvarchar(128)"); b.Property("ValueType") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Migrations/20220909024056_Initial.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Migrations/20220913013911_Initial.cs similarity index 99% rename from templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Migrations/20220909024056_Initial.cs rename to templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Migrations/20220913013911_Initial.cs index d8f26faf2c..3ac474ad9c 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Migrations/20220909024056_Initial.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Migrations/20220913013911_Initial.cs @@ -91,7 +91,7 @@ namespace MyCompanyName.MyProjectName.Mvc.Migrations IsVisibleToClients = table.Column(type: "bit", nullable: false), IsAvailableToHost = table.Column(type: "bit", nullable: false), AllowedProviders = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - ValueType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + ValueType = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: true), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Migrations/MyProjectNameDbContextModelSnapshot.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Migrations/MyProjectNameDbContextModelSnapshot.cs index 688d6910a9..c0470fe523 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Migrations/MyProjectNameDbContextModelSnapshot.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Migrations/MyProjectNameDbContextModelSnapshot.cs @@ -334,8 +334,8 @@ namespace MyCompanyName.MyProjectName.Mvc.Migrations .HasColumnType("nvarchar(128)"); b.Property("ValueType") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20220909023853_Initial.Designer.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20220913013531_Initial.Designer.cs similarity index 99% rename from templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20220909023853_Initial.Designer.cs rename to templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20220913013531_Initial.Designer.cs index 0e60d3c43b..0bde26a8f0 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20220909023853_Initial.Designer.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20220913013531_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace MyCompanyName.MyProjectName.Migrations { [DbContext(typeof(MyProjectNameDbContext))] - [Migration("20220909023853_Initial")] + [Migration("20220913013531_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -394,8 +394,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("nvarchar(128)"); b.Property("ValueType") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20220909023853_Initial.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20220913013531_Initial.cs similarity index 99% rename from templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20220909023853_Initial.cs rename to templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20220913013531_Initial.cs index 979458acc5..66d0345c4d 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20220909023853_Initial.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/20220913013531_Initial.cs @@ -112,7 +112,7 @@ namespace MyCompanyName.MyProjectName.Migrations IsVisibleToClients = table.Column(type: "bit", nullable: false), IsAvailableToHost = table.Column(type: "bit", nullable: false), AllowedProviders = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - ValueType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + ValueType = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: true), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/MyProjectNameDbContextModelSnapshot.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/MyProjectNameDbContextModelSnapshot.cs index 2f4dd59b75..886d835d39 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/MyProjectNameDbContextModelSnapshot.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.EntityFrameworkCore/Migrations/MyProjectNameDbContextModelSnapshot.cs @@ -392,8 +392,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("nvarchar(128)"); b.Property("ValueType") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/Migrations/20220909024101_Initial.Designer.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/Migrations/20220913013849_Initial.Designer.cs similarity index 99% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/Migrations/20220909024101_Initial.Designer.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/Migrations/20220913013849_Initial.Designer.cs index ecf317435c..9a631c7b43 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/Migrations/20220909024101_Initial.Designer.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/Migrations/20220913013849_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace MyCompanyName.MyProjectName.Migrations { [DbContext(typeof(AuthServerDbContext))] - [Migration("20220909024101_Initial")] + [Migration("20220913013849_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -336,8 +336,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("nvarchar(128)"); b.Property("ValueType") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/Migrations/20220909024101_Initial.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/Migrations/20220913013849_Initial.cs similarity index 99% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/Migrations/20220909024101_Initial.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/Migrations/20220913013849_Initial.cs index db22e15401..0f04de7baf 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/Migrations/20220909024101_Initial.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/Migrations/20220913013849_Initial.cs @@ -91,7 +91,7 @@ namespace MyCompanyName.MyProjectName.Migrations IsVisibleToClients = table.Column(type: "bit", nullable: false), IsAvailableToHost = table.Column(type: "bit", nullable: false), AllowedProviders = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - ValueType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + ValueType = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: true), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/Migrations/AuthServerDbContextModelSnapshot.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/Migrations/AuthServerDbContextModelSnapshot.cs index 7c33ebf9a1..f8618ceb41 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/Migrations/AuthServerDbContextModelSnapshot.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.AuthServer/Migrations/AuthServerDbContextModelSnapshot.cs @@ -334,8 +334,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("nvarchar(128)"); b.Property("ValueType") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20220909024110_Initial.Designer.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20220913013738_Initial.Designer.cs similarity index 99% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20220909024110_Initial.Designer.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20220913013738_Initial.Designer.cs index 4212fbcf7c..be2db0118e 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20220909024110_Initial.Designer.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20220913013738_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations { [DbContext(typeof(UnifiedDbContext))] - [Migration("20220909024110_Initial")] + [Migration("20220913013738_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -336,8 +336,8 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations .HasColumnType("nvarchar(128)"); b.Property("ValueType") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20220909024110_Initial.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20220913013738_Initial.cs similarity index 99% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20220909024110_Initial.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20220913013738_Initial.cs index 3a13a1bdfd..9ea6264819 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20220909024110_Initial.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/20220913013738_Initial.cs @@ -91,7 +91,7 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations IsVisibleToClients = table.Column(type: "bit", nullable: false), IsAvailableToHost = table.Column(type: "bit", nullable: false), AllowedProviders = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - ValueType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + ValueType = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: true), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/UnifiedDbContextModelSnapshot.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/UnifiedDbContextModelSnapshot.cs index a28b93cced..4075c6614f 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/UnifiedDbContextModelSnapshot.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Blazor.Server.Host/Migrations/UnifiedDbContextModelSnapshot.cs @@ -334,8 +334,8 @@ namespace MyCompanyName.MyProjectName.Blazor.Server.Host.Migrations .HasColumnType("nvarchar(128)"); b.Property("ValueType") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20220909024111_Initial.Designer.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20220913013700_Initial.Designer.cs similarity index 99% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20220909024111_Initial.Designer.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20220913013700_Initial.Designer.cs index 6262b656fe..3f4920a34b 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20220909024111_Initial.Designer.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20220913013700_Initial.Designer.cs @@ -13,7 +13,7 @@ using Volo.Abp.EntityFrameworkCore; namespace MyCompanyName.MyProjectName.Migrations { [DbContext(typeof(UnifiedDbContext))] - [Migration("20220909024111_Initial")] + [Migration("20220913013700_Initial")] partial class Initial { protected override void BuildTargetModel(ModelBuilder modelBuilder) @@ -336,8 +336,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("nvarchar(128)"); b.Property("ValueType") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20220909024111_Initial.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20220913013700_Initial.cs similarity index 99% rename from templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20220909024111_Initial.cs rename to templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20220913013700_Initial.cs index 7d956f49d2..b24184d7d4 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20220909024111_Initial.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/20220913013700_Initial.cs @@ -91,7 +91,7 @@ namespace MyCompanyName.MyProjectName.Migrations IsVisibleToClients = table.Column(type: "bit", nullable: false), IsAvailableToHost = table.Column(type: "bit", nullable: false), AllowedProviders = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), - ValueType = table.Column(type: "nvarchar(256)", maxLength: 256, nullable: true), + ValueType = table.Column(type: "nvarchar(2048)", maxLength: 2048, nullable: true), ExtraProperties = table.Column(type: "nvarchar(max)", nullable: true) }, constraints: table => diff --git a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs index 4b7d49f237..2329a1d737 100644 --- a/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs +++ b/templates/module/aspnet-core/host/MyCompanyName.MyProjectName.Web.Unified/Migrations/UnifiedDbContextModelSnapshot.cs @@ -334,8 +334,8 @@ namespace MyCompanyName.MyProjectName.Migrations .HasColumnType("nvarchar(128)"); b.Property("ValueType") - .HasMaxLength(256) - .HasColumnType("nvarchar(256)"); + .HasMaxLength(2048) + .HasColumnType("nvarchar(2048)"); b.HasKey("Id"); From 0922fb9d11cb11086b4a122c761655f16b7b8447 Mon Sep 17 00:00:00 2001 From: Enis Necipoglu Date: Tue, 13 Sep 2022 09:48:38 +0300 Subject: [PATCH 06/17] Add nightly nuget source --- templates/NuGet.Config | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 templates/NuGet.Config diff --git a/templates/NuGet.Config b/templates/NuGet.Config new file mode 100644 index 0000000000..d595c5314d --- /dev/null +++ b/templates/NuGet.Config @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file From f2826f81cbb88d93d5116d70fee71877f72e0f07 Mon Sep 17 00:00:00 2001 From: Enis Necipoglu Date: Tue, 13 Sep 2022 09:48:57 +0300 Subject: [PATCH 07/17] Update LeptonX depencencies as nightly --- templates/app-nolayers/angular/package.json | 2 +- .../MyCompanyName.MyProjectName.Blazor.Server.Mongo.csproj | 4 ++-- .../package.json | 2 +- .../MyCompanyName.MyProjectName.Blazor.Server.csproj | 4 ++-- .../MyCompanyName.MyProjectName.Blazor.Server/package.json | 4 ++-- .../MyCompanyName.MyProjectName.Host.Mongo.csproj | 2 +- .../MyCompanyName.MyProjectName.Host.Mongo/package.json | 2 +- .../MyCompanyName.MyProjectName.Host.csproj | 2 +- .../aspnet-core/MyCompanyName.MyProjectName.Host/package.json | 2 +- .../MyCompanyName.MyProjectName.Mvc.Mongo.csproj | 2 +- .../MyCompanyName.MyProjectName.Mvc.Mongo/package.json | 2 +- .../MyCompanyName.MyProjectName.Mvc.csproj | 2 +- .../aspnet-core/MyCompanyName.MyProjectName.Mvc/package.json | 2 +- templates/app/angular/package.json | 2 +- .../MyCompanyName.MyProjectName.AuthServer.csproj | 2 +- .../src/MyCompanyName.MyProjectName.AuthServer/package.json | 2 +- .../MyCompanyName.MyProjectName.Blazor.Server.Tiered.csproj | 4 ++-- .../package.json | 4 ++-- .../MyCompanyName.MyProjectName.Blazor.Server.csproj | 4 ++-- .../MyCompanyName.MyProjectName.Blazor.Server/package.json | 4 ++-- .../MyCompanyName.MyProjectName.Blazor.csproj | 2 +- .../MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj | 2 +- .../package.json | 2 +- .../MyCompanyName.MyProjectName.Web.Host.csproj | 2 +- .../src/MyCompanyName.MyProjectName.Web.Host/package.json | 2 +- .../MyCompanyName.MyProjectName.Web.csproj | 2 +- .../src/MyCompanyName.MyProjectName.Web/package.json | 2 +- 27 files changed, 34 insertions(+), 34 deletions(-) diff --git a/templates/app-nolayers/angular/package.json b/templates/app-nolayers/angular/package.json index 0623734b12..dea271a148 100644 --- a/templates/app-nolayers/angular/package.json +++ b/templates/app-nolayers/angular/package.json @@ -19,7 +19,7 @@ "@abp/ng.setting-management": "~6.0.0-rc.3", "@abp/ng.tenant-management": "~6.0.0-rc.3", "@abp/ng.theme.shared": "~6.0.0-rc.3", - "@abp/ng.theme.lepton-x": "~1.0.0-rc.3", + "@abp/ng.theme.lepton-x": "~2.0.0-preview20220912", "@angular/animations": "~13.1.1", "@angular/common": "~13.1.1", "@angular/compiler": "~13.1.1", diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/MyCompanyName.MyProjectName.Blazor.Server.Mongo.csproj b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/MyCompanyName.MyProjectName.Blazor.Server.Mongo.csproj index b96ca830b6..a55de568b6 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/MyCompanyName.MyProjectName.Blazor.Server.Mongo.csproj +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/MyCompanyName.MyProjectName.Blazor.Server.Mongo.csproj @@ -21,8 +21,8 @@ - - + + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/package.json b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/package.json index f5ca0ac67a..0dd715d6b6 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/package.json +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.components.server.leptonxlitetheme": "~1.0.0-rc.3" + "@abp/aspnetcore.components.server.leptonxlitetheme": "~2.0.0-preview20220912" } } diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj index b915262a65..8df64cc659 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj @@ -21,8 +21,8 @@ - - + + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/package.json b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/package.json index 3b1f8217d6..846190577e 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/package.json +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/package.json @@ -3,7 +3,7 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~1.0.0-rc.3", - "@abp/aspnetcore.components.server.leptonxlitetheme": "~1.0.0-rc.3" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~2.0.0-preview20220912", + "@abp/aspnetcore.components.server.leptonxlitetheme": "~2.0.0-preview20220912" } } diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/MyCompanyName.MyProjectName.Host.Mongo.csproj b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/MyCompanyName.MyProjectName.Host.Mongo.csproj index 6d700763c7..a4cd35e914 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/MyCompanyName.MyProjectName.Host.Mongo.csproj +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/MyCompanyName.MyProjectName.Host.Mongo.csproj @@ -69,7 +69,7 @@ - + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/package.json b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/package.json index 5d61662903..c4ed9e7271 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/package.json +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~1.0.0-rc.3" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~2.0.0-preview20220912" } } diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/MyCompanyName.MyProjectName.Host.csproj b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/MyCompanyName.MyProjectName.Host.csproj index 782a0b7afb..e39893b7c3 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/MyCompanyName.MyProjectName.Host.csproj +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/MyCompanyName.MyProjectName.Host.csproj @@ -70,7 +70,7 @@ - + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/package.json b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/package.json index 5d61662903..c4ed9e7271 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/package.json +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~1.0.0-rc.3" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~2.0.0-preview20220912" } } diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/MyCompanyName.MyProjectName.Mvc.Mongo.csproj b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/MyCompanyName.MyProjectName.Mvc.Mongo.csproj index 694178b55b..0b7707245a 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/MyCompanyName.MyProjectName.Mvc.Mongo.csproj +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/MyCompanyName.MyProjectName.Mvc.Mongo.csproj @@ -17,7 +17,7 @@ - + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/package.json b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/package.json index 5d61662903..c4ed9e7271 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/package.json +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~1.0.0-rc.3" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~2.0.0-preview20220912" } } diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/MyCompanyName.MyProjectName.Mvc.csproj b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/MyCompanyName.MyProjectName.Mvc.csproj index d942bd74a0..692c05efa8 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/MyCompanyName.MyProjectName.Mvc.csproj +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/MyCompanyName.MyProjectName.Mvc.csproj @@ -17,7 +17,7 @@ - + diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/package.json b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/package.json index 5d61662903..c4ed9e7271 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/package.json +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~1.0.0-rc.3" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~2.0.0-preview20220912" } } diff --git a/templates/app/angular/package.json b/templates/app/angular/package.json index fbd8cfde72..66a1178a3e 100644 --- a/templates/app/angular/package.json +++ b/templates/app/angular/package.json @@ -19,7 +19,7 @@ "@abp/ng.setting-management": "~6.0.0-rc.3", "@abp/ng.tenant-management": "~6.0.0-rc.3", "@abp/ng.theme.shared": "~6.0.0-rc.3", - "@abp/ng.theme.lepton-x": "~1.0.0-rc.3", + "@abp/ng.theme.lepton-x": "~2.0.0-preview20220912", "@angular/animations": "~13.3.3", "@angular/common": "~13.3.3", "@angular/compiler": "~13.3.3", diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/MyCompanyName.MyProjectName.AuthServer.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/MyCompanyName.MyProjectName.AuthServer.csproj index 47e3d8abfc..92fb889665 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/MyCompanyName.MyProjectName.AuthServer.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/MyCompanyName.MyProjectName.AuthServer.csproj @@ -43,7 +43,7 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/package.json index 6ced480563..b289be237c 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/package.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.AuthServer/package.json @@ -3,6 +3,6 @@ "name": "my-app-authserver", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~1.0.0-rc.3" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~2.0.0-preview20220912" } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyCompanyName.MyProjectName.Blazor.Server.Tiered.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyCompanyName.MyProjectName.Blazor.Server.Tiered.csproj index 91dab1bff0..9b83a0e083 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyCompanyName.MyProjectName.Blazor.Server.Tiered.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/MyCompanyName.MyProjectName.Blazor.Server.Tiered.csproj @@ -29,8 +29,8 @@ - - + + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/package.json index 3b1f8217d6..846190577e 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/package.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server.Tiered/package.json @@ -3,7 +3,7 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~1.0.0-rc.3", - "@abp/aspnetcore.components.server.leptonxlitetheme": "~1.0.0-rc.3" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~2.0.0-preview20220912", + "@abp/aspnetcore.components.server.leptonxlitetheme": "~2.0.0-preview20220912" } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj index de7bc577a6..9a0d99022c 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/MyCompanyName.MyProjectName.Blazor.Server.csproj @@ -27,8 +27,8 @@ - - + + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/package.json index 3b1f8217d6..846190577e 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/package.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor.Server/package.json @@ -3,7 +3,7 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~1.0.0-rc.3", - "@abp/aspnetcore.components.server.leptonxlitetheme": "~1.0.0-rc.3" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~2.0.0-preview20220912", + "@abp/aspnetcore.components.server.leptonxlitetheme": "~2.0.0-preview20220912" } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj index 8cd4c0d3c8..f6ebc44fba 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Blazor/MyCompanyName.MyProjectName.Blazor.csproj @@ -23,7 +23,7 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj index 1df4ec3e02..0d954718d8 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/MyCompanyName.MyProjectName.HttpApi.HostWithIds.csproj @@ -25,7 +25,7 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/package.json index 5d61662903..c4ed9e7271 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/package.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.HttpApi.HostWithIds/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~1.0.0-rc.3" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~2.0.0-preview20220912" } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj index 5b12cb50f3..382abd0d7c 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/MyCompanyName.MyProjectName.Web.Host.csproj @@ -27,7 +27,7 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/package.json index 5d61662903..c4ed9e7271 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/package.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web.Host/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~1.0.0-rc.3" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~2.0.0-preview20220912" } } diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj index 4f2b5e268e..81e5609f91 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/MyCompanyName.MyProjectName.Web.csproj @@ -41,7 +41,7 @@ - + diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/package.json b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/package.json index 5d61662903..c4ed9e7271 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/package.json +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.Web/package.json @@ -3,6 +3,6 @@ "name": "my-app", "private": true, "dependencies": { - "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~1.0.0-rc.3" + "@abp/aspnetcore.mvc.ui.theme.leptonxlite": "~2.0.0-preview20220912" } } From 864602f0311566b7ebf1c2fc7a25a9780f72ffd6 Mon Sep 17 00:00:00 2001 From: LiangShiWei Date: Tue, 13 Sep 2022 15:21:12 +0800 Subject: [PATCH 08/17] Ignore the case when adding file --- .../Abp/AspNetCore/Mvc/UI/Bundling/BundleFileContributor.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleFileContributor.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleFileContributor.cs index f6b709c897..7f218e7fbf 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleFileContributor.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling.Abstractions/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleFileContributor.cs @@ -16,7 +16,7 @@ public class BundleFileContributor : BundleContributor { foreach (var file in Files) { - context.Files.AddIfNotContains(file); + context.Files.AddIfNotContains(x => x.Equals(file, StringComparison.OrdinalIgnoreCase), () => file); } } } From 96f1446b9e6b68cea7656badd1ab3c2aad9e63b1 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 13 Sep 2022 15:29:15 +0800 Subject: [PATCH 09/17] Cache a `scope` with multiple `ApiResource`. Fix #13982 --- .../Volo/Abp/IdentityServer/ResourceStore.cs | 29 ++++++++++++------- .../ResourceStore_Cache_Tests.cs | 6 ++-- .../AbpIdentityServerTestDataBuilder.cs | 1 + 3 files changed, 23 insertions(+), 13 deletions(-) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs index 51862d7597..f9988a377e 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ResourceStore.cs @@ -31,6 +31,7 @@ public class ResourceStore : IResourceStore protected IDistributedCache IdentityResourceCache { get; } protected IDistributedCache ApiScopeCache { get; } protected IDistributedCache ApiResourceCache { get; } + protected IDistributedCache> ApiResourcesCache { get; } protected IDistributedCache ResourcesCache { get; } protected IdentityServerOptions Options { get; } @@ -42,6 +43,7 @@ public class ResourceStore : IResourceStore IDistributedCache identityResourceCache, IDistributedCache apiScopeCache, IDistributedCache apiResourceCache, + IDistributedCache> apiResourcesCache, IDistributedCache resourcesCache, IOptions options) { @@ -52,6 +54,7 @@ public class ResourceStore : IResourceStore IdentityResourceCache = identityResourceCache; ApiScopeCache = apiScopeCache; ApiResourceCache = apiResourceCache; + ApiResourcesCache = apiResourcesCache; ResourcesCache = resourcesCache; Options = options.Value; } @@ -91,16 +94,22 @@ public class ResourceStore : IResourceStore /// public virtual async Task> FindApiResourcesByScopeNameAsync(IEnumerable scopeNames) { - return (await GetCacheItemsAsync( - ApiResourceCache, - scopeNames, - async keys => await ApiResourceRepository.GetListByScopesAsync(keys, includeDetails: true), - (models, cacheKeyPrefix) => - { - return models - .Select(model => model.Scopes.Select(scope => new KeyValuePair(AddCachePrefix(scope, cacheKeyPrefix), model)).ToList()) - .Where(scopes => scopes.Any()).Cast>>().ToList(); - }, ApiResourceScopeNameCacheKeyPrefix)).DistinctBy(x => x.Name); + var cacheItems = await ApiResourcesCache.GetManyAsync(AddCachePrefix(scopeNames, ApiResourceScopeNameCacheKeyPrefix)); + if (cacheItems.All(x => x.Value != null)) + { + return cacheItems.SelectMany(x => x.Value).DistinctBy(x => x.Name); + } + + var otherKeys = RemoveCachePrefix(cacheItems.Where(x => x.Value == null).Select(x => x.Key), ApiResourceScopeNameCacheKeyPrefix).ToArray(); + var otherModels = ObjectMapper.Map, List>(await ApiResourceRepository.GetListByScopesAsync(otherKeys, includeDetails: true)); + + var otherCacheItems = otherKeys.Select(otherKey => new KeyValuePair>(AddCachePrefix(otherKey, ApiResourceScopeNameCacheKeyPrefix), otherModels)).ToList(); + await ApiResourcesCache.SetManyAsync(otherCacheItems, new DistributedCacheEntryOptions + { + AbsoluteExpirationRelativeToNow = Options.Caching.ClientStoreExpiration + }); + + return cacheItems.Where(x => x.Value != null).SelectMany(x => x.Value).Concat(otherModels).DistinctBy(x => x.Name); } /// diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/ResourceStore_Cache_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/ResourceStore_Cache_Tests.cs index b33b8aa580..20b8ff8689 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/ResourceStore_Cache_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/ResourceStore_Cache_Tests.cs @@ -51,14 +51,14 @@ public class ResourceStore_Cache_Tests : AbpIdentityServerDomainTestBase { var apiResources1 = (await _resourceStore.FindApiResourcesByScopeNameAsync(new[] { "Test-ApiResource-ApiScope-Name-1" })).ToList(); apiResources1.ShouldNotBeEmpty(); - apiResources1.Count.ShouldBe(1); - apiResources1.First().Name.ShouldBe("Test-ApiResource-Name-1"); + apiResources1.Count.ShouldBe(2); + apiResources1.ShouldContain(x => x.Name == "Test-ApiResource-Name-1"); var apiResources2 = (await _resourceStore.FindApiResourcesByScopeNameAsync(new[] { "Test-ApiResource-ApiScope-Name-1", "Test-ApiResource-ApiScope-Name-2", nameof(ApiResourceScope.Scope) })).ToList(); apiResources2.ShouldNotBeEmpty(); apiResources2.Count.ShouldBe(2); apiResources2.ShouldContain(x => x.Name == "Test-ApiResource-Name-1"); - apiResources2.ShouldContain(x => x.Name == apiResources1.First().Name); + apiResources2.ShouldContain(x => x.Name == "NewApiResource1"); } [Fact] diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs index eaf8aabf58..e6344f9c6f 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs @@ -87,6 +87,7 @@ public class AbpIdentityServerTestDataBuilder : ITransientDependency apiResource.DisplayName = nameof(apiResource.DisplayName); apiResource.AddScope(nameof(ApiResourceScope.Scope)); + apiResource.AddScope("Test-ApiResource-ApiScope-Name-1"); apiResource.AddUserClaim(nameof(ApiResourceClaim.Type)); apiResource.AddSecret(nameof(ApiResourceSecret.Value)); From d0c31b220a6da7e37ef1a82179b9bab054255632 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 13 Sep 2022 17:04:29 +0800 Subject: [PATCH 10/17] Change default options in migration environment. --- .../BackgroundJobs/AbpBackgroundJobsModule.cs | 14 ++++++++++++-- .../AbpFeatureManagementDomainModule.cs | 14 +++++++++----- .../AbpPermissionManagementDomainModule.cs | 17 ++++++++++++----- 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs index 1c8daf3f82..7e5910f938 100644 --- a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs +++ b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs @@ -20,10 +20,20 @@ namespace Volo.Abp.BackgroundJobs; )] public class AbpBackgroundJobsModule : AbpModule { + public override void ConfigureServices(ServiceConfigurationContext context) + { + if (context.Services.IsMigrationEnvironment()) + { + Configure(options => + { + options.IsJobExecutionEnabled = false; + }); + } + } + public override async Task OnApplicationInitializationAsync(ApplicationInitializationContext context) { - if (!context.ServiceProvider.IsMigrationEnvironment() && - context.ServiceProvider.GetRequiredService>().Value.IsJobExecutionEnabled) + if (context.ServiceProvider.GetRequiredService>().Value.IsJobExecutionEnabled) { await context.AddBackgroundWorkerAsync(); } diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainModule.cs index 015df09cdc..06aa79daca 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainModule.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainModule.cs @@ -40,6 +40,15 @@ public class AbpFeatureManagementDomainModule : AbpModule { options.MapCodeNamespace("AbpFeatureManagement", typeof(AbpFeatureManagementResource)); }); + + if (context.Services.IsMigrationEnvironment()) + { + Configure(options => + { + options.SaveStaticFeaturesToDatabase = false; + options.IsDynamicFeatureStoreEnabled = false; + }); + } } private readonly CancellationTokenSource _cancellationTokenSource = new(); @@ -63,11 +72,6 @@ public class AbpFeatureManagementDomainModule : AbpModule private void InitializeDynamicFeatures(ApplicationInitializationContext context) { - if (context.ServiceProvider.IsMigrationEnvironment()) - { - return; - } - var options = context .ServiceProvider .GetRequiredService>() diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/AbpPermissionManagementDomainModule.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/AbpPermissionManagementDomainModule.cs index 67c438582e..a94daf5926 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/AbpPermissionManagementDomainModule.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/AbpPermissionManagementDomainModule.cs @@ -27,6 +27,18 @@ public class AbpPermissionManagementDomainModule : AbpModule { private readonly CancellationTokenSource _cancellationTokenSource = new(); + public override void ConfigureServices(ServiceConfigurationContext context) + { + if (context.Services.IsMigrationEnvironment()) + { + Configure(options => + { + options.SaveStaticPermissionsToDatabase = false; + options.IsDynamicPermissionStoreEnabled = false; + }); + } + } + public override void OnApplicationInitialization(ApplicationInitializationContext context) { AsyncHelper.RunSync(() => OnApplicationInitializationAsync(context)); @@ -46,11 +58,6 @@ public class AbpPermissionManagementDomainModule : AbpModule private void InitializeDynamicPermissions(ApplicationInitializationContext context) { - if (context.ServiceProvider.IsMigrationEnvironment()) - { - return; - } - var options = context .ServiceProvider .GetRequiredService>() From 0aca30ae71c6eafc4bd03e6fba8d905ea690f0b4 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 13 Sep 2022 17:38:02 +0800 Subject: [PATCH 11/17] Rename. --- .../Data/AbpDataMigrationEnvironmentExtensions.cs | 14 +++++++------- .../Program.cs | 2 +- .../Program.cs | 2 +- .../Program.cs | 2 +- .../MyCompanyName.MyProjectName.Host/Program.cs | 2 +- .../Program.cs | 2 +- .../MyCompanyName.MyProjectName.Mvc/Program.cs | 2 +- .../DbMigratorHostedService.cs | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataMigrationEnvironmentExtensions.cs b/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataMigrationEnvironmentExtensions.cs index 050ee2127e..ca47c86577 100644 --- a/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataMigrationEnvironmentExtensions.cs +++ b/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataMigrationEnvironmentExtensions.cs @@ -6,33 +6,33 @@ namespace Volo.Abp.Data; public static class AbpDataMigrationEnvironmentExtensions { - public static void AddMigrationEnvironment(this AbpApplicationCreationOptions options, AbpDataMigrationEnvironment environment = null) + public static void AddDataMigrationEnvironment(this AbpApplicationCreationOptions options, AbpDataMigrationEnvironment environment = null) { - options.Services.AddMigrationEnvironment(environment ?? new AbpDataMigrationEnvironment()); + options.Services.AddDataMigrationEnvironment(environment ?? new AbpDataMigrationEnvironment()); } - public static void AddMigrationEnvironment(this IServiceCollection services, AbpDataMigrationEnvironment environment = null) + public static void AddDataMigrationEnvironment(this IServiceCollection services, AbpDataMigrationEnvironment environment = null) { services.AddObjectAccessor(environment ?? new AbpDataMigrationEnvironment()); } - public static AbpDataMigrationEnvironment GetMigrationEnvironment(this IServiceCollection services) + public static AbpDataMigrationEnvironment GetDataMigrationEnvironment(this IServiceCollection services) { return services.GetObjectOrNull>()?.Value; } public static bool IsMigrationEnvironment(this IServiceCollection services) { - return services.GetMigrationEnvironment() != null; + return services.GetDataMigrationEnvironment() != null; } - public static AbpDataMigrationEnvironment GetMigrationEnvironment(this IServiceProvider serviceProvider) + public static AbpDataMigrationEnvironment GetDataMigrationEnvironment(this IServiceProvider serviceProvider) { return serviceProvider.GetService>()?.Value; } public static bool IsMigrationEnvironment(this IServiceProvider serviceProvider) { - return serviceProvider.GetMigrationEnvironment() != null; + return serviceProvider.GetDataMigrationEnvironment() != null; } } diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/Program.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/Program.cs index 36ef778848..fb3c83f100 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/Program.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server.Mongo/Program.cs @@ -38,7 +38,7 @@ public class Program await builder.AddApplicationAsync(); if (IsMigrateDatabase(args)) { - builder.Services.AddMigrationEnvironment(); + builder.Services.AddDataMigrationEnvironment(); } var app = builder.Build(); await app.InitializeApplicationAsync(); diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Program.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Program.cs index 542b860add..ec8097460d 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Program.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Blazor.Server/Program.cs @@ -43,7 +43,7 @@ public class Program await builder.AddApplicationAsync(); if (IsMigrateDatabase(args)) { - builder.Services.AddMigrationEnvironment(); + builder.Services.AddDataMigrationEnvironment(); } var app = builder.Build(); await app.InitializeApplicationAsync(); diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/Program.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/Program.cs index 36ef778848..fb3c83f100 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/Program.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host.Mongo/Program.cs @@ -38,7 +38,7 @@ public class Program await builder.AddApplicationAsync(); if (IsMigrateDatabase(args)) { - builder.Services.AddMigrationEnvironment(); + builder.Services.AddDataMigrationEnvironment(); } var app = builder.Build(); await app.InitializeApplicationAsync(); diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Program.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Program.cs index 542b860add..ec8097460d 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Program.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Host/Program.cs @@ -43,7 +43,7 @@ public class Program await builder.AddApplicationAsync(); if (IsMigrateDatabase(args)) { - builder.Services.AddMigrationEnvironment(); + builder.Services.AddDataMigrationEnvironment(); } var app = builder.Build(); await app.InitializeApplicationAsync(); diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/Program.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/Program.cs index 36ef778848..fb3c83f100 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/Program.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc.Mongo/Program.cs @@ -38,7 +38,7 @@ public class Program await builder.AddApplicationAsync(); if (IsMigrateDatabase(args)) { - builder.Services.AddMigrationEnvironment(); + builder.Services.AddDataMigrationEnvironment(); } var app = builder.Build(); await app.InitializeApplicationAsync(); diff --git a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Program.cs b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Program.cs index 542b860add..ec8097460d 100644 --- a/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Program.cs +++ b/templates/app-nolayers/aspnet-core/MyCompanyName.MyProjectName.Mvc/Program.cs @@ -43,7 +43,7 @@ public class Program await builder.AddApplicationAsync(); if (IsMigrateDatabase(args)) { - builder.Services.AddMigrationEnvironment(); + builder.Services.AddDataMigrationEnvironment(); } var app = builder.Build(); await app.InitializeApplicationAsync(); diff --git a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/DbMigratorHostedService.cs b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/DbMigratorHostedService.cs index 827bd31505..92e723ba59 100644 --- a/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/DbMigratorHostedService.cs +++ b/templates/app/aspnet-core/src/MyCompanyName.MyProjectName.DbMigrator/DbMigratorHostedService.cs @@ -28,7 +28,7 @@ public class DbMigratorHostedService : IHostedService options.Services.ReplaceConfiguration(_configuration); options.UseAutofac(); options.Services.AddLogging(c => c.AddSerilog()); - options.AddMigrationEnvironment(); + options.AddDataMigrationEnvironment(); })) { await application.InitializeAsync(); From e390a7bf6c63422f6df78764e65105f8447c72fa Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 13 Sep 2022 17:45:53 +0800 Subject: [PATCH 12/17] Rename. --- .../Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs | 2 +- .../Volo/Abp/Data/AbpDataMigrationEnvironmentExtensions.cs | 4 ++-- .../Abp/FeatureManagement/AbpFeatureManagementDomainModule.cs | 2 +- .../AbpPermissionManagementDomainModule.cs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs index 7e5910f938..08cc66130c 100644 --- a/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs +++ b/framework/src/Volo.Abp.BackgroundJobs/Volo/Abp/BackgroundJobs/AbpBackgroundJobsModule.cs @@ -22,7 +22,7 @@ public class AbpBackgroundJobsModule : AbpModule { public override void ConfigureServices(ServiceConfigurationContext context) { - if (context.Services.IsMigrationEnvironment()) + if (context.Services.IsDataMigrationEnvironment()) { Configure(options => { diff --git a/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataMigrationEnvironmentExtensions.cs b/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataMigrationEnvironmentExtensions.cs index ca47c86577..29907b9385 100644 --- a/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataMigrationEnvironmentExtensions.cs +++ b/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataMigrationEnvironmentExtensions.cs @@ -21,7 +21,7 @@ public static class AbpDataMigrationEnvironmentExtensions return services.GetObjectOrNull>()?.Value; } - public static bool IsMigrationEnvironment(this IServiceCollection services) + public static bool IsDataMigrationEnvironment(this IServiceCollection services) { return services.GetDataMigrationEnvironment() != null; } @@ -31,7 +31,7 @@ public static class AbpDataMigrationEnvironmentExtensions return serviceProvider.GetService>()?.Value; } - public static bool IsMigrationEnvironment(this IServiceProvider serviceProvider) + public static bool IsDataMigrationEnvironment(this IServiceProvider serviceProvider) { return serviceProvider.GetDataMigrationEnvironment() != null; } diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainModule.cs index 06aa79daca..ba8105cb88 100644 --- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainModule.cs +++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo/Abp/FeatureManagement/AbpFeatureManagementDomainModule.cs @@ -41,7 +41,7 @@ public class AbpFeatureManagementDomainModule : AbpModule options.MapCodeNamespace("AbpFeatureManagement", typeof(AbpFeatureManagementResource)); }); - if (context.Services.IsMigrationEnvironment()) + if (context.Services.IsDataMigrationEnvironment()) { Configure(options => { diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/AbpPermissionManagementDomainModule.cs b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/AbpPermissionManagementDomainModule.cs index a94daf5926..71b42a20fb 100644 --- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/AbpPermissionManagementDomainModule.cs +++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain/Volo/Abp/PermissionManagement/AbpPermissionManagementDomainModule.cs @@ -29,7 +29,7 @@ public class AbpPermissionManagementDomainModule : AbpModule public override void ConfigureServices(ServiceConfigurationContext context) { - if (context.Services.IsMigrationEnvironment()) + if (context.Services.IsDataMigrationEnvironment()) { Configure(options => { From a3e8d4e92367a9b9c8bdfc7f4534177aa0a91d6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Wed, 14 Sep 2022 09:53:34 +0300 Subject: [PATCH 13/17] Set Dapr HttpEndpoint only if provided Otherwise, the default value will be used and fine for most scenarios. --- .../Volo/Abp/Http/Client/Dapr/AbpInvocationHandler.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.Http.Client.Dapr/Volo/Abp/Http/Client/Dapr/AbpInvocationHandler.cs b/framework/src/Volo.Abp.Http.Client.Dapr/Volo/Abp/Http/Client/Dapr/AbpInvocationHandler.cs index a3397b55e4..e13c6dbb04 100644 --- a/framework/src/Volo.Abp.Http.Client.Dapr/Volo/Abp/Http/Client/Dapr/AbpInvocationHandler.cs +++ b/framework/src/Volo.Abp.Http.Client.Dapr/Volo/Abp/Http/Client/Dapr/AbpInvocationHandler.cs @@ -9,6 +9,9 @@ public class AbpInvocationHandler : InvocationHandler, ITransientDependency { public AbpInvocationHandler(IOptions daprOptions) { - DaprEndpoint = daprOptions.Value.HttpEndpoint; + if (!daprOptions.Value.HttpEndpoint.IsNullOrWhiteSpace()) + { + DaprEndpoint = daprOptions.Value.HttpEndpoint; + } } } \ No newline at end of file From 0518ba48be3c3754d53e32b3ad2f2eef3079c140 Mon Sep 17 00:00:00 2001 From: Hamza Albreem <94292623+braim23@users.noreply.github.com> Date: Wed, 14 Sep 2022 11:01:14 +0300 Subject: [PATCH 14/17] quick fix --- docs/en/Themes/LeptonXLite/Blazor.md | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/en/Themes/LeptonXLite/Blazor.md b/docs/en/Themes/LeptonXLite/Blazor.md index 9cbb81ea38..0e32aa9825 100644 --- a/docs/en/Themes/LeptonXLite/Blazor.md +++ b/docs/en/Themes/LeptonXLite/Blazor.md @@ -137,7 +137,7 @@ builder.RootComponents.Add("#ApplicationContainer"); @Name ``` -* If you prefer to use a code-behind file for the C# code of your component, create a razor component, like `MyMainLayout.razor.cs`, in your blazor application as shown below: see below: +* If you prefer to use a code-behind file for the C# code of your component, create a razor component, like `MyMainLayout.razor.cs`, in your blazor application as shown below: ```csharp [ExposeServices(typeof(MainLayout))] @@ -151,7 +151,7 @@ namespace LeptonXLite.DemoApp.Blazor.MyComponents } ``` -> Don't forget to repeated same attributes from the razor page! +> Don't forget to remove the repeated attributes from the razor page! ### Toolbars LeptonX Lite includes separeted toolbars for desktop & mobile. You can manage toolbars independently. Toolbar names can be accessible in the **LeptonXLiteToolbars** class. @@ -184,7 +184,7 @@ public async Task ConfigureToolbarAsync(IToolbarConfigurationContext context) ## Components -LeptonX Blazor built on the basis of components. You can use the components in your application as you wish, or you can customize components with overriding the components. If you want to override a component please follow the steps. +LeptonX Blazor is built on the basis of components. You can use the components in your application as you wish, or you can customize the components by overriding them. If you want to override a component please follow the steps. ### Branding Component @@ -207,7 +207,7 @@ The **brand component** is a simple component that can be used to display your b @Name ``` -* If you prefer to use a code-behind file for the C# code of your component, create a razor component, like `MyBrandingComponent.razor.cs`, in your blazor application as shown below: see below: +* If you prefer to use a code-behind file for the C# code of your component, create a razor component, like `MyBrandingComponent.razor.cs`, in your blazor application as shown below: ```csharp namespace LeptonXLite.DemoApp.Blazor.MyComponents @@ -225,7 +225,7 @@ On websites that have a lot of pages, **breadcrumb navigation** can greatly **en -#### How to Override BreadCrumb Component +#### How to Override the BreadCrumb Component * Create a razor page, like `MyBreadcrumbsComponent.razor`, in your blazor application as shown below: @@ -258,11 +258,11 @@ namespace LeptonXLite.DemoApp.Blazor.MyComponents ### Main Menu Component -Sidebar menus have been used as **a directory for Related Pages** to a **Service** offering, **Navigation** items to a **specific service** or topic and even just as **Links** the user may be interested in. +Sidebar menus have been used as **a directory for Related Pages** for a **Service** offering, **Navigation** items for a **specific service** or topic and even just as **Links** the user may be interested in. -#### How to Override Main Menu Component +#### How to Override the Main Menu Component * Create a razor page, like `MyMainMenuComponent.razor`, in your blazor application as shown below: @@ -293,13 +293,13 @@ namespace LeptonXLite.DemoApp.Blazor.MyComponents } ``` -> The **main menu** renders menu items **dynamic**. The **menu item** is a **razor component** named `MainMenuItem.razor.cs` in the same namespace with **main menu** and you can **override it** like main menu. +> The **main menu** renders the menu items **dynamically**. The **menu item** is a **razor component** named `MainMenuItem.razor.cs` in the same namespace with **main menu** and you can **override it** like the main menu. ### Toolbar Items Component Toolbar items are used to add **extra functionality to the toolbar**. The toolbar is a **horizontal bar** that **contains** a group of **toolbar items**. -#### How to Override Toolbar Items Component +#### How to Override the Toolbar Items Component * Create a razor page, like `MyToolbarItemsComponent.razor`, in your blazor application as shown below: @@ -336,7 +336,7 @@ Think about a **multi-lingual** website and the first thing that could **hit you -#### How to Override Language Switch Component +#### How to Override the Language Switch Component * Create a razor page, like `MyLanguageSwitchComponent.razor`, in your blazor application as shown below: @@ -373,7 +373,7 @@ The **mobile** **language switch component** is used to switch the language of t -#### How to Override Mobile Language Switch Component +#### How to Override the Mobile Language Switch Component * Create a razor page, like `MyMobilLanguageSwitchComponent.razor`, in your blazor application as shown below: @@ -399,7 +399,7 @@ namespace LeptonXLite.DemoApp.Blazor.MyComponents [Dependency(ReplaceServices = true)] public partial class MyMobilLanguageSwitchComponent { - public string Name = "My Mobil Language Switch Component"; + public string Name = "My Mobile Language Switch Component"; } } ``` @@ -410,7 +410,7 @@ The **User Menu** is the **menu** that **drops down** when you **click your name -#### How to Override User Menu Component +#### How to Override the User Menu Component * Create a razor page, like `MyUserMenuComponent.razor`, in your blazor application as shown below: From 62165449dd6c6c3ace57e2b264ad4f2abcc521f8 Mon Sep 17 00:00:00 2001 From: maliming Date: Thu, 15 Sep 2022 10:39:52 +0800 Subject: [PATCH 15/17] Fix Identity Server unit tests. --- .../Cache/IdentityServerCacheItemInvalidator_Tests.cs | 9 ++++++--- .../Clients/IdentityResourceStore_Tests.cs | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Cache/IdentityServerCacheItemInvalidator_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Cache/IdentityServerCacheItemInvalidator_Tests.cs index 6d0b8a3b19..a464fcc75f 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Cache/IdentityServerCacheItemInvalidator_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Cache/IdentityServerCacheItemInvalidator_Tests.cs @@ -1,4 +1,5 @@ -using System.Threading.Tasks; +using System.Collections.Generic; +using System.Threading.Tasks; using IdentityServer4.Models; using IdentityServer4.Services; using IdentityServer4.Stores; @@ -28,6 +29,7 @@ public class IdentityServerCacheItemInvalidator_Tests : AbpIdentityServerTestBas private readonly IDistributedCache _clientCache; private readonly IDistributedCache _identityResourceCache; + private readonly IDistributedCache> _apiResourcesCache; private readonly IDistributedCache _apiResourceCache; private readonly IDistributedCache _apiScopeCache; private readonly IDistributedCache _resourceCache; @@ -46,6 +48,7 @@ public class IdentityServerCacheItemInvalidator_Tests : AbpIdentityServerTestBas _clientCache = GetRequiredService>(); _identityResourceCache = GetRequiredService>(); + _apiResourcesCache = GetRequiredService>>(); _apiResourceCache = GetRequiredService>(); _apiScopeCache = GetRequiredService>(); _resourceCache = GetRequiredService>(); @@ -93,9 +96,9 @@ public class IdentityServerCacheItemInvalidator_Tests : AbpIdentityServerTestBas (await _apiResourceCache.GetAsync(newApiResource2)).ShouldBeNull(); //FindApiResourcesByScopeNameAsync - (await _apiResourceCache.GetAsync(ResourceStore.ApiResourceScopeNameCacheKeyPrefix + testApiResourceApiScopeName1)).ShouldBeNull(); + (await _apiResourcesCache.GetAsync(ResourceStore.ApiResourceScopeNameCacheKeyPrefix + testApiResourceApiScopeName1)).ShouldBeNull(); await _resourceStore.FindApiResourcesByScopeNameAsync(new[] { testApiResourceApiScopeName1 }); - (await _apiResourceCache.GetAsync(ResourceStore.ApiResourceScopeNameCacheKeyPrefix + testApiResourceApiScopeName1)).ShouldNotBeNull(); + (await _apiResourcesCache.GetAsync(ResourceStore.ApiResourceScopeNameCacheKeyPrefix + testApiResourceApiScopeName1)).ShouldNotBeNull(); var testApiResource1 = await _apiResourceRepository.FindByNameAsync(testApiResourceName1); await _apiResourceRepository.DeleteAsync(testApiResource1); diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs index c54c99e88d..27e3b04c5a 100644 --- a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs +++ b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/IdentityResourceStore_Tests.cs @@ -51,9 +51,9 @@ public class IdentityResourceStore_Tests : AbpIdentityServerTestBase })).ToList(); //Assert - apiResources.ShouldNotBe(null); + apiResources.ShouldNotBeNull(); - apiResources[0].Scopes.Count.ShouldBe(4); + apiResources.ShouldContain(x => x.Scopes.Contains("Test-ApiResource-ApiScope-Name-1")); } [Fact] From 828f0c375327b86fd02fb101b456b466dfaee705 Mon Sep 17 00:00:00 2001 From: maliming Date: Thu, 15 Sep 2022 13:06:31 +0800 Subject: [PATCH 16/17] Fix `GetDataMigrationEnvironment`. --- .../Volo/Abp/Data/AbpDataMigrationEnvironmentExtensions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataMigrationEnvironmentExtensions.cs b/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataMigrationEnvironmentExtensions.cs index 29907b9385..796b547164 100644 --- a/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataMigrationEnvironmentExtensions.cs +++ b/framework/src/Volo.Abp.Data/Volo/Abp/Data/AbpDataMigrationEnvironmentExtensions.cs @@ -18,7 +18,7 @@ public static class AbpDataMigrationEnvironmentExtensions public static AbpDataMigrationEnvironment GetDataMigrationEnvironment(this IServiceCollection services) { - return services.GetObjectOrNull>()?.Value; + return services.GetObjectOrNull(); } public static bool IsDataMigrationEnvironment(this IServiceCollection services) From 584c78b39ecf0525a4b38e7461638f7d54865900 Mon Sep 17 00:00:00 2001 From: LiangShiWei Date: Thu, 15 Sep 2022 13:53:20 +0800 Subject: [PATCH 17/17] Implement IMultiTenant for the ETO --- .../Volo/Abp/Identity/IdentityRoleEto.cs | 3 ++- .../Volo/Abp/Identity/OrganizationUnitEto.cs | 3 ++- .../src/Volo.Abp.Users.Abstractions/Volo/Abp/Users/UserEto.cs | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/IdentityRoleEto.cs b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/IdentityRoleEto.cs index ffc29488bf..2956a57238 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/IdentityRoleEto.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/IdentityRoleEto.cs @@ -1,9 +1,10 @@ using System; +using Volo.Abp.MultiTenancy; namespace Volo.Abp.Identity; [Serializable] -public class IdentityRoleEto +public class IdentityRoleEto : IMultiTenant { public Guid Id { get; set; } diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/OrganizationUnitEto.cs b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/OrganizationUnitEto.cs index 3ccdb7e076..83ece813d1 100644 --- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/OrganizationUnitEto.cs +++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo/Abp/Identity/OrganizationUnitEto.cs @@ -1,9 +1,10 @@ using System; +using Volo.Abp.MultiTenancy; namespace Volo.Abp.Identity; [Serializable] -public class OrganizationUnitEto +public class OrganizationUnitEto : IMultiTenant { public Guid Id { get; set; } diff --git a/modules/users/src/Volo.Abp.Users.Abstractions/Volo/Abp/Users/UserEto.cs b/modules/users/src/Volo.Abp.Users.Abstractions/Volo/Abp/Users/UserEto.cs index 3e90b7d32c..e99befa225 100644 --- a/modules/users/src/Volo.Abp.Users.Abstractions/Volo/Abp/Users/UserEto.cs +++ b/modules/users/src/Volo.Abp.Users.Abstractions/Volo/Abp/Users/UserEto.cs @@ -1,11 +1,12 @@ using System; using Volo.Abp.Data; using Volo.Abp.EventBus; +using Volo.Abp.MultiTenancy; namespace Volo.Abp.Users; [EventName("Volo.Abp.Users.User")] -public class UserEto : IUserData, IHasExtraProperties +public class UserEto : IUserData, IHasExtraProperties, IMultiTenant { public Guid Id { get; set; }