From fe72aba723211071f90c17a27369da0e4d6f1822 Mon Sep 17 00:00:00 2001 From: Kishore Sahasranaman Date: Fri, 16 Oct 2020 15:59:38 +0530 Subject: [PATCH 1/8] Added Service Proxy Generation To generate proxies for updated C# classes. --- docs/en/Tutorials/Part-10.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/en/Tutorials/Part-10.md b/docs/en/Tutorials/Part-10.md index 2e0b1c4939..70afab36b1 100644 --- a/docs/en/Tutorials/Part-10.md +++ b/docs/en/Tutorials/Part-10.md @@ -911,6 +911,17 @@ You can run the application and try to create a new book or update an existing b {{else if UI=="NG"}} +### Service Proxy Generation + +[ABP CLI](../CLI.md) provides `generate-proxy` command that generates client proxies for your HTTP APIs to make easy to consume your HTTP APIs from the client side. Before running `generate-proxy` command, your host must be up and running. + +Run the following command in the `angular` folder: + +```bash +abp generate-proxy +``` +This command will update the service proxy files under the `/src/app/proxy/` folder. + ### The Book List Book list page change is trivial. Open the `/src/app/book/book.component.html` and add the following column definition between the `Name` and `Type` columns: @@ -1164,4 +1175,4 @@ Add the following `Field` definition into the `ModalBody` of the *Edit* modal, a That's all. We are reusing the `authorList` defined for the *Create* modal. -{{end}} \ No newline at end of file +{{end}} From 59ee6f9ed4c29f4027806be422c7ebbb744e0a4e Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Mon, 16 Nov 2020 16:51:11 +0300 Subject: [PATCH 2/8] add additional lookup text field. --- .../TagHelpers/Form/AbpSelectTagHelper.cs | 4 ++++ .../Form/AbpSelectTagHelperService.cs | 12 +++++++++++- .../bootstrap/dom-event-handlers.js | 15 +++++++++++++++ .../CachedObjectExtensionsDtoService.cs | 3 +-- .../Modularity/EntityExtensionConfiguration.cs | 18 +++++++++++++++++- 5 files changed, 48 insertions(+), 4 deletions(-) diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelper.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelper.cs index cc8abb6095..2f4440b904 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelper.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelper.cs @@ -31,6 +31,10 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form public string AutocompleteFilterParamName { get; set; } + public string AutocompleteSelectedItemName { get; set; } + + public string AutocompleteSelectedItemValue { get; set; } + public AbpSelectTagHelper(AbpSelectTagHelperService tagHelperService) : base(tagHelperService) { diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs index 534801d126..7741807aae 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/TagHelpers/Form/AbpSelectTagHelperService.cs @@ -1,4 +1,5 @@ -using Microsoft.AspNetCore.Mvc.Rendering; +using Microsoft.AspNetCore.Mvc.Diagnostics; +using Microsoft.AspNetCore.Mvc.Rendering; using Microsoft.AspNetCore.Mvc.TagHelpers; using Microsoft.AspNetCore.Mvc.ViewFeatures; using Microsoft.AspNetCore.Razor.TagHelpers; @@ -85,6 +86,13 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form { selectTagHelper.Items = GetSelectItems(context, output); } + else + { + selectTagHelper.Items = new SelectListItem[] + { + new SelectListItem(TagHelper.AutocompleteSelectedItemName,TagHelper.AutocompleteSelectedItemValue,true) + }; + } var selectTagHelperOutput = await selectTagHelper.ProcessAndGetOutputAsync(GetInputAttributes(context, output), context, "select", TagMode.StartTagAndEndTag); @@ -107,6 +115,8 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.TagHelpers.Form output.Attributes.Add("data-autocomplete-display-property", TagHelper.AutocompleteDisplayPropertyName); output.Attributes.Add("data-autocomplete-value-property", TagHelper.AutocompleteValuePropertyName); output.Attributes.Add("data-autocomplete-filter-param-name", TagHelper.AutocompleteFilterParamName); + output.Attributes.Add("data-autocomplete-selected-item-name", TagHelper.AutocompleteSelectedItemName); + output.Attributes.Add("data-autocomplete-selected-item-value", TagHelper.AutocompleteSelectedItemValue); } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/dom-event-handlers.js b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/dom-event-handlers.js index 4489a234c1..431d9093f7 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/dom-event-handlers.js +++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/wwwroot/libs/abp/aspnetcore-mvc-ui-theme-shared/bootstrap/dom-event-handlers.js @@ -80,6 +80,18 @@ var displayValue = $(this).data("autocompleteValueProperty"); var itemsPropertyName = $(this).data("autocompleteItemsProperty"); var filterParamName = $(this).data("autocompleteFilterParamName"); + var selectedText = $(this).data("autocompleteSelectedItemName"); + var name = $(this).attr("name"); + var selectedTextInputName = name.substring(0, name.length - 1) + "_Text]"; + var selectedTextInput = $('', { + type: 'hidden', + id: selectedTextInputName, + name: selectedTextInputName, + }); + if (selectedText != "") { + selectedTextInput.val(selectedText); + } + selectedTextInput.insertAfter($select); $select.select2({ ajax: { url: url, @@ -109,6 +121,9 @@ }, width: '100%' }); + $select.on('select2:select', function (e) { + selectedTextInput.val(e.params.data.text); + }); }); } } diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/CachedObjectExtensionsDtoService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/CachedObjectExtensionsDtoService.cs index 651f3ed93e..22102f82c5 100644 --- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/CachedObjectExtensionsDtoService.cs +++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ApplicationConfigurations/ObjectExtending/CachedObjectExtensionsDtoService.cs @@ -140,8 +140,7 @@ namespace Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.ObjectExtending }, OnTable = new ExtensionPropertyUiTableDto { - IsVisible = propertyConfig.UI.OnTable.IsVisible && - propertyConfig.UI.Lookup.Url.IsNullOrEmpty() + IsVisible = propertyConfig.UI.OnTable.IsVisible }, Lookup = new ExtensionPropertyUiLookupDto { diff --git a/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/Modularity/EntityExtensionConfiguration.cs b/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/Modularity/EntityExtensionConfiguration.cs index d03696b642..384fc355f9 100644 --- a/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/Modularity/EntityExtensionConfiguration.cs +++ b/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/Modularity/EntityExtensionConfiguration.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Collections.Immutable; using JetBrains.Annotations; +using Volo.Abp.Localization; namespace Volo.Abp.ObjectExtending.Modularity { @@ -47,14 +48,29 @@ namespace Volo.Abp.ObjectExtending.Modularity propertyName, () => new ExtensionPropertyConfiguration(this, propertyType, propertyName) ); - configureAction?.Invoke(propertyInfo); NormalizeProperty(propertyInfo); + AddLookupProperty(propertyInfo); + return this; } + private void AddLookupProperty(ExtensionPropertyConfiguration propertyInfo) + { + if (!propertyInfo.UI.Lookup.Url.IsNullOrEmpty()) + { + var lookupPropertyName = $"{propertyInfo.Name}_Text"; + var lookupPropertyInfo = Properties.GetOrAdd( + lookupPropertyName, + () => new ExtensionPropertyConfiguration(this, typeof(string), lookupPropertyName) + ); + lookupPropertyInfo.DisplayName = propertyInfo.DisplayName ?? new FixedLocalizableString(propertyInfo.Name); + propertyInfo.UI.OnTable.IsVisible = false; + } + } + [NotNull] public virtual ImmutableList GetProperties() { From 8ac5e85549442016a635fbac6eae020f12dc700b Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Mon, 16 Nov 2020 16:51:44 +0300 Subject: [PATCH 3/8] extra properties autocomplete text field added. --- .../Pages/Identity/Roles/CreateModal.cshtml | 37 +++++++++++-------- .../Pages/Identity/Roles/EditModal.cshtml | 37 +++++++++++-------- .../Pages/Identity/Users/CreateModal.cshtml | 37 +++++++++++-------- .../Pages/Identity/Users/EditModal.cshtml | 37 +++++++++++-------- .../Tenants/CreateModal.cshtml | 37 +++++++++++-------- .../TenantManagement/Tenants/EditModal.cshtml | 37 +++++++++++-------- 6 files changed, 126 insertions(+), 96 deletions(-) diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/CreateModal.cshtml b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/CreateModal.cshtml index 25857a407f..902b984ede 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/CreateModal.cshtml +++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/CreateModal.cshtml @@ -24,23 +24,28 @@ @foreach (var propertyInfo in ObjectExtensionManager.Instance.GetProperties()) { - if (propertyInfo.Type.IsEnum || !propertyInfo.Lookup.Url.IsNullOrEmpty()) + if (!propertyInfo.Name.EndsWith("_Text")) { - - } - else - { - + if (propertyInfo.Type.IsEnum || !propertyInfo.Lookup.Url.IsNullOrEmpty()) + { + + } + else + { + + } } } diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/EditModal.cshtml b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/EditModal.cshtml index 41b7ee2693..0e60b15733 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/EditModal.cshtml +++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Roles/EditModal.cshtml @@ -35,23 +35,28 @@ @foreach (var propertyInfo in ObjectExtensionManager.Instance.GetProperties()) { - if (propertyInfo.Type.IsEnum || !propertyInfo.Lookup.Url.IsNullOrEmpty()) + if (!propertyInfo.Name.EndsWith("_Text")) { - - } - else - { - + if (propertyInfo.Type.IsEnum || !propertyInfo.Lookup.Url.IsNullOrEmpty()) + { + + } + else + { + + } } } diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml index 1f3f8c3244..0f4eab328b 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml +++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/CreateModal.cshtml @@ -29,23 +29,28 @@ @foreach (var propertyInfo in ObjectExtensionManager.Instance.GetProperties()) { - if (propertyInfo.Type.IsEnum || !propertyInfo.Lookup.Url.IsNullOrEmpty()) + if (!propertyInfo.Name.EndsWith("_Text")) { - - } - else - { - + if (propertyInfo.Type.IsEnum || !propertyInfo.Lookup.Url.IsNullOrEmpty()) + { + + } + else + { + + } } } diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml index 34fc0547be..3a0bda16d2 100644 --- a/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml +++ b/modules/identity/src/Volo.Abp.Identity.Web/Pages/Identity/Users/EditModal.cshtml @@ -31,23 +31,28 @@ @foreach (var propertyInfo in ObjectExtensionManager.Instance.GetProperties()) { - if (propertyInfo.Type.IsEnum || !propertyInfo.Lookup.Url.IsNullOrEmpty()) + if (!propertyInfo.Name.EndsWith("_Text")) { - - } - else - { - + if (propertyInfo.Type.IsEnum || !propertyInfo.Lookup.Url.IsNullOrEmpty()) + { + + } + else + { + + } } } diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/CreateModal.cshtml b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/CreateModal.cshtml index 305aec2f34..99bd1f5cc4 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/CreateModal.cshtml +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/CreateModal.cshtml @@ -24,23 +24,28 @@ @foreach (var propertyInfo in ObjectExtensionManager.Instance.GetProperties()) { - if (propertyInfo.Type.IsEnum || !propertyInfo.Lookup.Url.IsNullOrEmpty()) + if (!propertyInfo.Name.EndsWith("_Text")) { - - } - else - { - + if (propertyInfo.Type.IsEnum || !propertyInfo.Lookup.Url.IsNullOrEmpty()) + { + + } + else + { + + } } } diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/EditModal.cshtml b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/EditModal.cshtml index 50b434b3f7..06103d6d9f 100644 --- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/EditModal.cshtml +++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Pages/TenantManagement/Tenants/EditModal.cshtml @@ -20,23 +20,28 @@ @foreach (var propertyInfo in ObjectExtensionManager.Instance.GetProperties()) { - if (propertyInfo.Type.IsEnum || !propertyInfo.Lookup.Url.IsNullOrEmpty()) + if (!propertyInfo.Name.EndsWith("_Text")) { - - } - else - { - + if (propertyInfo.Type.IsEnum || !propertyInfo.Lookup.Url.IsNullOrEmpty()) + { + + } + else + { + + } } } From 700f9884e65eb9fc338b8dbb1049d1ffb0d52757 Mon Sep 17 00:00:00 2001 From: Ilkay Ilknur Date: Mon, 16 Nov 2020 17:20:38 +0300 Subject: [PATCH 4/8] hide lookup property from Getoperation and refactoring. --- .../EntityExtensionConfiguration.cs | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/Modularity/EntityExtensionConfiguration.cs b/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/Modularity/EntityExtensionConfiguration.cs index 384fc355f9..33dd44fbb0 100644 --- a/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/Modularity/EntityExtensionConfiguration.cs +++ b/framework/src/Volo.Abp.ObjectExtending/Volo/Abp/ObjectExtending/Modularity/EntityExtensionConfiguration.cs @@ -52,23 +52,23 @@ namespace Volo.Abp.ObjectExtending.Modularity NormalizeProperty(propertyInfo); - AddLookupProperty(propertyInfo); - - return this; - } - - private void AddLookupProperty(ExtensionPropertyConfiguration propertyInfo) - { if (!propertyInfo.UI.Lookup.Url.IsNullOrEmpty()) { - var lookupPropertyName = $"{propertyInfo.Name}_Text"; - var lookupPropertyInfo = Properties.GetOrAdd( - lookupPropertyName, - () => new ExtensionPropertyConfiguration(this, typeof(string), lookupPropertyName) - ); - lookupPropertyInfo.DisplayName = propertyInfo.DisplayName ?? new FixedLocalizableString(propertyInfo.Name); + AddLookupTextProperty(propertyInfo); propertyInfo.UI.OnTable.IsVisible = false; + propertyInfo.Api.OnGet.IsAvailable = false; } + return this; + } + + private void AddLookupTextProperty(ExtensionPropertyConfiguration propertyInfo) + { + var lookupTextPropertyName = $"{propertyInfo.Name}_Text"; + var lookupTextPropertyInfo = Properties.GetOrAdd( + lookupTextPropertyName, + () => new ExtensionPropertyConfiguration(this, typeof(string), lookupTextPropertyName) + ); + lookupTextPropertyInfo.DisplayName = propertyInfo.DisplayName ?? new FixedLocalizableString(propertyInfo.Name); } [NotNull] From 677b36a354d6f972ba022760bd7a8321b1816633 Mon Sep 17 00:00:00 2001 From: maliming Date: Tue, 17 Nov 2020 14:12:24 +0800 Subject: [PATCH 5/8] Enabling split queries globally. --- ...DbContextConfigurationContextMySQLExtensions.cs | 14 ++++++++++++-- ...xtConfigurationContextOracleDevartExtensions.cs | 1 + ...bContextConfigurationContextOracleExtensions.cs | 1 + ...textConfigurationContextPostgreSqlExtensions.cs | 12 ++++++++++-- ...ntextConfigurationContextSqlServerExtensions.cs | 12 ++++++++++-- ...bContextConfigurationContextSqliteExtensions.cs | 12 ++++++++++-- .../AbpAuditLoggingEfCoreQueryableExtensions.cs | 1 - .../IdentityEfCoreQueryableExtensions.cs | 1 - .../AbpIdentityServerEfCoreQueryableExtensions.cs | 2 -- 9 files changed, 44 insertions(+), 12 deletions(-) diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextMySQLExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextMySQLExtensions.cs index 60f4337757..7bea179323 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextMySQLExtensions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextMySQLExtensions.cs @@ -14,11 +14,21 @@ namespace Volo.Abp.EntityFrameworkCore { if (context.ExistingConnection != null) { - return context.DbContextOptions.UseMySql(context.ExistingConnection, ServerVersion.AutoDetect(context.ConnectionString), mySQLOptionsAction); + return context.DbContextOptions.UseMySql(context.ExistingConnection, + ServerVersion.AutoDetect(context.ConnectionString), optionsBuilder => + { + optionsBuilder.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); + mySQLOptionsAction?.Invoke(optionsBuilder); + }); } else { - return context.DbContextOptions.UseMySql(context.ConnectionString, ServerVersion.AutoDetect(context.ConnectionString), mySQLOptionsAction); + return context.DbContextOptions.UseMySql(context.ConnectionString, + ServerVersion.AutoDetect(context.ConnectionString), optionsBuilder => + { + optionsBuilder.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); + mySQLOptionsAction?.Invoke(optionsBuilder); + }); } } } diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleDevartExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleDevartExtensions.cs index ba70772c9e..eaaed380af 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleDevartExtensions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleDevartExtensions.cs @@ -13,6 +13,7 @@ // [CanBeNull] Action oracleOptionsAction = null, // bool useExistingConnectionIfAvailable = false) // { +// TODO: UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); // if (useExistingConnectionIfAvailable && context.ExistingConnection != null) // { // return context.DbContextOptions.UseOracle(context.ExistingConnection, oracleOptionsAction); diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleExtensions.cs index cb3a92d2cf..2dd3139a82 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleExtensions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleExtensions.cs @@ -12,6 +12,7 @@ // [NotNull] this AbpDbContextConfigurationContext context, // [CanBeNull] Action oracleOptionsAction = null) // { +// TODO: UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); // if (context.ExistingConnection != null) // { // return context.DbContextOptions.UseOracle(context.ExistingConnection, oracleOptionsAction); diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextPostgreSqlExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextPostgreSqlExtensions.cs index 9ab28dddcb..45aa590c09 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextPostgreSqlExtensions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextPostgreSqlExtensions.cs @@ -22,11 +22,19 @@ namespace Volo.Abp.EntityFrameworkCore { if (context.ExistingConnection != null) { - return context.DbContextOptions.UseNpgsql(context.ExistingConnection, postgreSqlOptionsAction); + return context.DbContextOptions.UseNpgsql(context.ExistingConnection, optionsBuilder => + { + optionsBuilder.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); + postgreSqlOptionsAction?.Invoke(optionsBuilder); + }); } else { - return context.DbContextOptions.UseNpgsql(context.ConnectionString, postgreSqlOptionsAction); + return context.DbContextOptions.UseNpgsql(context.ConnectionString, optionsBuilder => + { + optionsBuilder.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); + postgreSqlOptionsAction?.Invoke(optionsBuilder); + }); } } } diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextSqlServerExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextSqlServerExtensions.cs index b916239c3b..47ebbef8c6 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextSqlServerExtensions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextSqlServerExtensions.cs @@ -14,11 +14,19 @@ namespace Volo.Abp.EntityFrameworkCore { if (context.ExistingConnection != null) { - return context.DbContextOptions.UseSqlServer(context.ExistingConnection, sqlServerOptionsAction); + return context.DbContextOptions.UseSqlServer(context.ExistingConnection, optionsBuilder => + { + optionsBuilder.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); + sqlServerOptionsAction?.Invoke(optionsBuilder); + }); } else { - return context.DbContextOptions.UseSqlServer(context.ConnectionString, sqlServerOptionsAction); + return context.DbContextOptions.UseSqlServer(context.ConnectionString, optionsBuilder => + { + optionsBuilder.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); + sqlServerOptionsAction?.Invoke(optionsBuilder); + }); } } } diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextSqliteExtensions.cs b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextSqliteExtensions.cs index 6fd69fa42e..4778dd8101 100644 --- a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextSqliteExtensions.cs +++ b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextSqliteExtensions.cs @@ -14,11 +14,19 @@ namespace Volo.Abp.EntityFrameworkCore { if (context.ExistingConnection != null) { - return context.DbContextOptions.UseSqlite(context.ExistingConnection, sqliteOptionsAction); + return context.DbContextOptions.UseSqlite(context.ExistingConnection, optionsBuilder => + { + optionsBuilder.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); + sqliteOptionsAction?.Invoke(optionsBuilder); + }); } else { - return context.DbContextOptions.UseSqlite(context.ConnectionString, sqliteOptionsAction); + return context.DbContextOptions.UseSqlite(context.ConnectionString, optionsBuilder => + { + optionsBuilder.UseQuerySplittingBehavior(QuerySplittingBehavior.SplitQuery); + sqliteOptionsAction?.Invoke(optionsBuilder); + }); } } } diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/AbpAuditLoggingEfCoreQueryableExtensions.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/AbpAuditLoggingEfCoreQueryableExtensions.cs index 11ba294610..6dc4bfadb8 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/AbpAuditLoggingEfCoreQueryableExtensions.cs +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/AbpAuditLoggingEfCoreQueryableExtensions.cs @@ -15,7 +15,6 @@ namespace Volo.Abp.AuditLogging } return queryable - .AsSplitQuery() .Include(x => x.Actions) .Include(x => x.EntityChanges).ThenInclude(ec=>ec.PropertyChanges); } diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/IdentityEfCoreQueryableExtensions.cs b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/IdentityEfCoreQueryableExtensions.cs index 8b6e470600..4eddc83ea3 100644 --- a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/IdentityEfCoreQueryableExtensions.cs +++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/IdentityEfCoreQueryableExtensions.cs @@ -13,7 +13,6 @@ namespace Volo.Abp.Identity.EntityFrameworkCore } return queryable - .AsSplitQuery() .Include(x => x.Roles) .Include(x => x.Logins) .Include(x => x.Claims) diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs index 768b53f763..58cb6cc7ac 100644 --- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs +++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/AbpIdentityServerEfCoreQueryableExtensions.cs @@ -17,7 +17,6 @@ namespace Volo.Abp.IdentityServer } return queryable - .AsSplitQuery() .Include(x => x.Secrets) .Include(x => x.UserClaims) .Include(x => x.Scopes) @@ -57,7 +56,6 @@ namespace Volo.Abp.IdentityServer } return queryable - .AsSplitQuery() .Include(x => x.AllowedGrantTypes) .Include(x => x.RedirectUris) .Include(x => x.PostLogoutRedirectUris) From 2e30a2ac1c92ec4993934829cc22607ab92a1ce0 Mon Sep 17 00:00:00 2001 From: liangshiwei Date: Tue, 17 Nov 2020 20:01:07 +0800 Subject: [PATCH 6/8] Fix logger generic type --- .../VoloDocs.Web/Utils/GlobalExceptionHandlerMiddleware.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/docs/app/VoloDocs.Web/Utils/GlobalExceptionHandlerMiddleware.cs b/modules/docs/app/VoloDocs.Web/Utils/GlobalExceptionHandlerMiddleware.cs index da303643d4..9ec6827dbe 100644 --- a/modules/docs/app/VoloDocs.Web/Utils/GlobalExceptionHandlerMiddleware.cs +++ b/modules/docs/app/VoloDocs.Web/Utils/GlobalExceptionHandlerMiddleware.cs @@ -11,9 +11,9 @@ namespace VoloDocs.Web.Utils public class GlobalExceptionHandlerMiddleware { private readonly RequestDelegate _next; - private readonly ILogger _logger; + private readonly ILogger _logger; - public GlobalExceptionHandlerMiddleware(RequestDelegate next, ILogger logger) + public GlobalExceptionHandlerMiddleware(RequestDelegate next, ILogger logger) { _logger = logger; _next = next; @@ -42,4 +42,4 @@ namespace VoloDocs.Web.Utils } } } -} \ No newline at end of file +} From 500f07a57da817b0ea28e4fdf42353f7da648393 Mon Sep 17 00:00:00 2001 From: mehmet-erim Date: Thu, 19 Nov 2020 15:58:48 +0300 Subject: [PATCH 7/8] fix: remove wrong apiName getter from application-configuration.service resolves #6250 --- .../lib/services/application-configuration.service.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/npm/ng-packs/packages/core/src/lib/services/application-configuration.service.ts b/npm/ng-packs/packages/core/src/lib/services/application-configuration.service.ts index 5be97fbb64..49192cdff0 100644 --- a/npm/ng-packs/packages/core/src/lib/services/application-configuration.service.ts +++ b/npm/ng-packs/packages/core/src/lib/services/application-configuration.service.ts @@ -9,11 +9,7 @@ import { RestService } from './rest.service'; providedIn: 'root', }) export class ApplicationConfigurationService { - get apiName(): string { - return this.environment.getEnvironment().application?.name; - } - - constructor(private rest: RestService, private environment: EnvironmentService) {} + constructor(private rest: RestService) {} getConfiguration(): Observable { const request: Rest.Request = { @@ -21,8 +17,6 @@ export class ApplicationConfigurationService { url: '/api/abp/application-configuration', }; - return this.rest.request(request, { - apiName: this.apiName, - }); + return this.rest.request(request, {}); } } From 31073f2e08fd86300b6ac59cb170db053451ca1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C4=B0brahim=20Kalkan?= Date: Thu, 19 Nov 2020 16:27:17 +0300 Subject: [PATCH 8/8] Update Part-10.md --- docs/en/Tutorials/Part-10.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/en/Tutorials/Part-10.md b/docs/en/Tutorials/Part-10.md index 70afab36b1..d5f9192411 100644 --- a/docs/en/Tutorials/Part-10.md +++ b/docs/en/Tutorials/Part-10.md @@ -913,9 +913,9 @@ You can run the application and try to create a new book or update an existing b ### Service Proxy Generation -[ABP CLI](../CLI.md) provides `generate-proxy` command that generates client proxies for your HTTP APIs to make easy to consume your HTTP APIs from the client side. Before running `generate-proxy` command, your host must be up and running. +Since the HTTP APIs have been changed, you need to update Angular client side [service proxies](../UI/Angular/Service-Proxies.md). Before running `generate-proxy` command, your host must be up and running. -Run the following command in the `angular` folder: +Run the following command in the `angular` folder (you may need to stop the angular application): ```bash abp generate-proxy