diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json
index 63e795efee..16ce5acab0 100644
--- a/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json
+++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Www/Localization/Resources/en.json
@@ -419,6 +419,15 @@
"WhoWeAre_Expert": "About Me",
"CreateSolutionFolder": "Create Solution Folder",
"CreateSolutionFolderOption": "Specifies if the project will be in a new folder in the output folder or directly the output folder.",
- "BooksPageTitle": "ABP Books"
+ "BooksPageTitle": "ABP Books",
+ "PackageDetailPage_NuGetPackageInstallationOptions": "There are two ways to install {0} NuGet package to your project",
+ "PackageDetailPage_InstallingWithABPCLI": "1: Installing with the ABP CLI",
+ "PackageDetailPage_InstallingWithABPCLIDescription1": "If you haven't installed the ABP CLI, first install by executing the following command in a command-line terminal",
+ "PackageDetailPage_InstallingWithABPCLIDescription2": "Once you have installed the ABP CLI, open a command-line terminal in the location of the project (.csproj file) you want to install it and execute the following command",
+ "PackageDetailPage_InstallingWithABPCLIDescription3": "It will add the {0} package reference to your project and the {1} dependency to your module class.",
+ "PackageDetailPage_ManualInstallation": "2: Manual Installation",
+ "PackageDetailPage_ManualInstallationDesription1": "Add {0} NuGet package reference to your project using your IDE or executing the following command",
+ "PackageDetailPage_ManualInstallationDesription2": "Then add the {0} dependency to your module class as shown in the following example",
+ "PackageDetailPage_SeeDocumentation": "See the documentation to learn how to use this package in your applications."
}
}
diff --git a/docs/en/Tutorials/Part-8.md b/docs/en/Tutorials/Part-8.md
index 24dafffdb9..9d638e909e 100644
--- a/docs/en/Tutorials/Part-8.md
+++ b/docs/en/Tutorials/Part-8.md
@@ -102,7 +102,7 @@ namespace Acme.BookStore.Authors;
public class GetAuthorListDto : PagedAndSortedResultRequestDto
{
- public string Filter { get; set; }
+ public string? Filter { get; set; }
}
````
diff --git a/docs/en/UI/Angular/Theme-Configurations.md b/docs/en/UI/Angular/Theme-Configurations.md
index e663955667..09cbc5914c 100644
--- a/docs/en/UI/Angular/Theme-Configurations.md
+++ b/docs/en/UI/Angular/Theme-Configurations.md
@@ -69,7 +69,7 @@ Theme packages no longer import styles as CSS modules as of ABP version 6.0. The
},
```
-## Lepton X
+## Lepton X [commercial](https://docs.abp.io/en/commercial)
```json
{
"input": "node_modules/@volosoft/ngx-lepton-x/assets/css/dark.css",
@@ -174,7 +174,7 @@ Theme packages no longer import styles as CSS modules as of ABP version 6.0. The
```
-## Theme Lepton
+## Theme Lepton [commercial](https://docs.abp.io/en/commercial)
```json
{
"input": "node_modules/@volo/abp.ng.theme.lepton/dist/global/styles/lepton1.min.css",
diff --git a/docs/en/docs-nav.json b/docs/en/docs-nav.json
index 4f33f30f51..ad2bbc652b 100644
--- a/docs/en/docs-nav.json
+++ b/docs/en/docs-nav.json
@@ -16,7 +16,7 @@
},
{
"text": "Getting Started",
- "path":"Getting-Started-Overall.md",
+ "path": "Getting-Started-Overall.md",
"items": [
{
"text": "Web Application - Layered Architecture",
@@ -1166,6 +1166,10 @@
"text": "Overall",
"path": "UI/Angular/Theming.md"
},
+ {
+ "text": "Configuration",
+ "path": "UI/Angular/Theme-Configurations.md"
+ },
{
"text": "The Basic Theme",
"path": "UI/Angular/Basic-Theme.md"
@@ -1405,8 +1409,8 @@
"path": "Modules/IdentityServer.md",
"items": [
{
- "text": "IdentityServer Migration Guide",
- "path": "Migration-Guides/IdentityServer4-Step-by-Step.md"
+ "text": "IdentityServer Migration Guide",
+ "path": "Migration-Guides/IdentityServer4-Step-by-Step.md"
}
]
},
@@ -1438,7 +1442,7 @@
},
{
"text": "Common",
- "items":[
+ "items": [
{
"text": "Database Tables",
"path": "Modules/Database-Tables.md"
@@ -1515,4 +1519,4 @@
"path": "Contribution/Index.md"
}
]
-}
\ No newline at end of file
+}
diff --git a/docs/zh-Hans/Tutorials/Part-8.md b/docs/zh-Hans/Tutorials/Part-8.md
index d3b78de7e0..5c58d1b524 100644
--- a/docs/zh-Hans/Tutorials/Part-8.md
+++ b/docs/zh-Hans/Tutorials/Part-8.md
@@ -107,7 +107,7 @@ namespace Acme.BookStore.Authors
{
public class GetAuthorListDto : PagedAndSortedResultRequestDto
{
- public string Filter { get; set; }
+ public string? Filter { get; set; }
}
}
````
diff --git a/framework/Volo.Abp.sln b/framework/Volo.Abp.sln
index f98d2dd1a5..1c201237e3 100644
--- a/framework/Volo.Abp.sln
+++ b/framework/Volo.Abp.sln
@@ -437,6 +437,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.AspNetCore.Compone
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Volo.Abp.Ldap.Abstractions", "src\Volo.Abp.Ldap.Abstractions\Volo.Abp.Ldap.Abstractions.csproj", "{0F80E95C-41E6-4F23-94FF-FC9D0B8D5D71}"
EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Volo.Abp.Ddd.Domain.Shared", "src\Volo.Abp.Ddd.Domain.Shared\Volo.Abp.Ddd.Domain.Shared.csproj", "{0858571B-CE73-4AD6-BD06-EC9F0714D8E9}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
@@ -1303,6 +1305,10 @@ Global
{0F80E95C-41E6-4F23-94FF-FC9D0B8D5D71}.Debug|Any CPU.Build.0 = Debug|Any CPU
{0F80E95C-41E6-4F23-94FF-FC9D0B8D5D71}.Release|Any CPU.ActiveCfg = Release|Any CPU
{0F80E95C-41E6-4F23-94FF-FC9D0B8D5D71}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0858571B-CE73-4AD6-BD06-EC9F0714D8E9}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0858571B-CE73-4AD6-BD06-EC9F0714D8E9}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0858571B-CE73-4AD6-BD06-EC9F0714D8E9}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0858571B-CE73-4AD6-BD06-EC9F0714D8E9}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -1523,6 +1529,7 @@ Global
{E9492F9F-47E0-45A6-A51D-9949FEAA8543} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6}
{8764DFAF-D13D-449A-9A5E-5D7F0B2D7FEF} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6}
{0F80E95C-41E6-4F23-94FF-FC9D0B8D5D71} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6}
+ {0858571B-CE73-4AD6-BD06-EC9F0714D8E9} = {5DF0E140-0513-4D0D-BE2E-3D4D85CD70E6}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {BB97ECF4-9A84-433F-A80B-2A3285BDD1D5}
diff --git a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AbpAspNetCoreMultiTenancyOptions.cs b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AbpAspNetCoreMultiTenancyOptions.cs
index 3e775d0da2..3ac06350d9 100644
--- a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AbpAspNetCoreMultiTenancyOptions.cs
+++ b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo/Abp/AspNetCore/MultiTenancy/AbpAspNetCoreMultiTenancyOptions.cs
@@ -1,14 +1,23 @@
using System;
using System.Globalization;
using System.Net;
+using System.Runtime.ExceptionServices;
+using System.Text;
using System.Text.Encodings.Web;
+using System.Text.Json;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Http.Extensions;
+using Microsoft.AspNetCore.Http.Json;
+using Microsoft.AspNetCore.Internal;
+using Microsoft.AspNetCore.Mvc.Formatters;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
+using Microsoft.Net.Http.Headers;
+using Volo.Abp.Http;
+using Volo.Abp.Json;
using Volo.Abp.MultiTenancy;
namespace Volo.Abp.AspNetCore.MultiTenancy;
@@ -58,14 +67,70 @@ public class AbpAspNetCoreMultiTenancyOptions
}
}
+ context.Response.Headers.Add("Abp-Tenant-Resolve-Error", HtmlEncoder.Default.Encode(exception.Message));
if (isCookieAuthentication && context.Request.Method.Equals("Get", StringComparison.OrdinalIgnoreCase) && !context.Request.IsAjax())
{
- context.Response.Headers.Add("Abp-Tenant-Resolve-Error", HtmlEncoder.Default.Encode(exception.Message));
context.Response.Redirect(context.Request.GetEncodedUrl());
}
+ else if (context.Request.IsAjax())
+ {
+ var error = new RemoteServiceErrorResponse(new RemoteServiceErrorInfo(exception.Message, exception is BusinessException businessException ? businessException.Details : string.Empty));
+
+ var jsonSerializerOptions = context.RequestServices.GetRequiredService>().Value.SerializerOptions;
+
+ ResponseContentTypeHelper.ResolveContentTypeAndEncoding(
+ null,
+ context.Response.ContentType,
+ (new MediaTypeHeaderValue("application/json")
+ {
+ Encoding = Encoding.UTF8
+ }.ToString(), Encoding.UTF8),
+ MediaType.GetEncoding,
+ out var resolvedContentType,
+ out var resolvedContentTypeEncoding);
+
+ context.Response.ContentType = resolvedContentType;
+ context.Response.StatusCode = (int)HttpStatusCode.NotFound;
+
+ var responseStream = context.Response.Body;
+ if (resolvedContentTypeEncoding.CodePage == Encoding.UTF8.CodePage)
+ {
+ try
+ {
+ await JsonSerializer.SerializeAsync(responseStream, error, error.GetType(), jsonSerializerOptions, context.RequestAborted);
+ await responseStream.FlushAsync(context.RequestAborted);
+ }
+ catch (OperationCanceledException) when (context.RequestAborted.IsCancellationRequested) { }
+ }
+ else
+ {
+ var transcodingStream = Encoding.CreateTranscodingStream(context.Response.Body, resolvedContentTypeEncoding, Encoding.UTF8, leaveOpen: true);
+ ExceptionDispatchInfo exceptionDispatchInfo = null;
+ try
+ {
+ await JsonSerializer.SerializeAsync(transcodingStream, error, error.GetType(), jsonSerializerOptions, context.RequestAborted);
+ await transcodingStream.FlushAsync(context.RequestAborted);
+ }
+ catch (OperationCanceledException) when (context.RequestAborted.IsCancellationRequested) { }
+ catch (Exception ex)
+ {
+ exceptionDispatchInfo = ExceptionDispatchInfo.Capture(ex);
+ }
+ finally
+ {
+ try
+ {
+ await transcodingStream.DisposeAsync();
+ }
+ catch when (exceptionDispatchInfo != null)
+ {
+ }
+ exceptionDispatchInfo?.Throw();
+ }
+ }
+ }
else
{
- context.Response.Headers.Add("Abp-Tenant-Resolve-Error", HtmlEncoder.Default.Encode(exception.Message));
context.Response.StatusCode = (int)HttpStatusCode.NotFound;
context.Response.ContentType = "text/html";
diff --git a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Internal/ResponseContentTypeHelper.cs b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Internal/ResponseContentTypeHelper.cs
new file mode 100644
index 0000000000..bff1290835
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Internal/ResponseContentTypeHelper.cs
@@ -0,0 +1,78 @@
+using System;
+using System.Net.Mime;
+using System.Text;
+using Microsoft.AspNetCore.Http;
+using Microsoft.Net.Http.Headers;
+
+namespace Microsoft.AspNetCore.Internal;
+
+///
+/// https://github.com/dotnet/aspnetcore/blob/release/7.0/src/Shared/ResponseContentTypeHelper.cs
+///
+public static class ResponseContentTypeHelper
+{
+ ///
+ /// Gets the content type and encoding that need to be used for the response.
+ /// The priority for selecting the content type is:
+ /// 1. ContentType property set on the action result
+ /// 2. property set on
+ /// 3. Default content type set on the action result
+ ///
+ ///
+ /// The user supplied content type is not modified and is used as is. For example, if user
+ /// sets the content type to be "text/plain" without any encoding, then the default content type's
+ /// encoding is used to write the response and the ContentType header is set to be "text/plain" without any
+ /// "charset" information.
+ ///
+ public static void ResolveContentTypeAndEncoding(
+ string? actionResultContentType,
+ string? httpResponseContentType,
+ (string defaultContentType, Encoding defaultEncoding) @default,
+ Func getEncoding,
+ out string resolvedContentType,
+ out Encoding resolvedContentTypeEncoding)
+ {
+ var (defaultContentType, defaultContentTypeEncoding) = @default;
+
+ // 1. User sets the ContentType property on the action result
+ if (actionResultContentType != null)
+ {
+ resolvedContentType = actionResultContentType;
+ var actionResultEncoding = getEncoding(actionResultContentType);
+ resolvedContentTypeEncoding = actionResultEncoding ?? defaultContentTypeEncoding;
+ return;
+ }
+
+ // 2. User sets the ContentType property on the http response directly
+ if (!string.IsNullOrEmpty(httpResponseContentType))
+ {
+ var mediaTypeEncoding = getEncoding(httpResponseContentType);
+ if (mediaTypeEncoding != null)
+ {
+ resolvedContentType = httpResponseContentType;
+ resolvedContentTypeEncoding = mediaTypeEncoding;
+ }
+ else
+ {
+ resolvedContentType = httpResponseContentType;
+ resolvedContentTypeEncoding = defaultContentTypeEncoding;
+ }
+
+ return;
+ }
+
+ // 3. Fall-back to the default content type
+ resolvedContentType = defaultContentType;
+ resolvedContentTypeEncoding = defaultContentTypeEncoding;
+ }
+
+ public static Encoding GetEncoding(string mediaType)
+ {
+ if (MediaTypeHeaderValue.TryParse(mediaType, out var parsed))
+ {
+ return parsed.Encoding;
+ }
+
+ return default;
+ }
+}
diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliUrls.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliUrls.cs
index 83ae5a9f73..35ae34b895 100644
--- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliUrls.cs
+++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/CliUrls.cs
@@ -29,6 +29,11 @@ public static class CliUrls
return $"{NuGetRootPath}{apiKey}/v3/package/{packageId}/index.json";
}
+ public static string GetNuGetPackageSearchUrl(string apiKey, string packageId)
+ {
+ return $"{NuGetRootPath}{apiKey}/v3/search?q={packageId}";
+ }
+
public static string GetApiDefinitionUrl(string url, ApplicationApiDescriptionModelRequestDto model = null)
{
url = url.EnsureEndsWith('/');
diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Version/CommercialPackages.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Version/CommercialPackages.cs
index e99eddb499..7bfb578a2d 100644
--- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Version/CommercialPackages.cs
+++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Version/CommercialPackages.cs
@@ -4,9 +4,9 @@ using System.Text;
namespace Volo.Abp.Cli.Version;
-internal static class CommercialPackages
+static internal class CommercialPackages
{
- private static readonly HashSet Packages = new()
+ private readonly static HashSet Packages = new()
{
"volo.abp.suite"
//other PRO packages can be added to this list...
diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Version/PackageVersionCheckerService.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Version/PackageVersionCheckerService.cs
index 43ced1a1a1..de8511cdca 100644
--- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Version/PackageVersionCheckerService.cs
+++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/Version/PackageVersionCheckerService.cs
@@ -109,20 +109,54 @@ public class PackageVersionCheckerService : ITransientDependency
return await GetPackageVersionsFromMyGet(packageId);
}
- if (CommercialPackages.IsCommercial(packageId))
+ if (await IsCommercialPackageAsync(packageId))
{
return await GetPackageVersionsFromAbpCommercialNuGetAsync(packageId);
}
- else
+
+ return await GetPackageVersionsFromNuGetOrgAsync(packageId) ?? new List();
+ }
+
+ private async Task IsCommercialPackageAsync(string packageId)
+ {
+ if (CommercialPackages.IsCommercial(packageId))
+ {
+ return true;
+ }
+
+ await SetApiKeyResultAsync();
+ if (_apiKeyResult?.ApiKey == null)
{
- var packagesFromNugetOrg = await GetPackageVersionsFromNuGetOrgAsync(packageId);
- if (packagesFromNugetOrg != null)
+ return false;
+ }
+
+ var searchUrl = CliUrls.GetNuGetPackageSearchUrl(_apiKeyResult.ApiKey, packageId);
+ return await HasAnyPackageAsync(searchUrl);
+ }
+
+ private async Task HasAnyPackageAsync(string url)
+ {
+ try
+ {
+ var client = _cliHttpClientFactory.CreateClient(needsAuthentication: false);
+
+ using (var responseMessage = await client.GetHttpResponseMessageWithRetryAsync(
+ url,
+ cancellationToken: CancellationTokenProvider.Token,
+ logger: Logger
+ ))
{
- return packagesFromNugetOrg;
+ await RemoteServiceExceptionHandler.EnsureSuccessfulHttpResponseAsync(responseMessage);
+
+ var responseContent = await responseMessage.Content.ReadAsStringAsync();
+
+ return JsonSerializer.Deserialize(responseContent).TotalHits > 0;
}
}
-
- return await GetPackageVersionsFromAbpCommercialNuGetAsync(packageId);
+ catch (Exception)
+ {
+ return false;
+ }
}
private async Task> GetPackageVersionsFromAbpCommercialNuGetAsync(string packageId)
@@ -175,19 +209,15 @@ public class PackageVersionCheckerService : ITransientDependency
private async Task GetNuGetUrlForCommercialPackage(string packageId)
{
- if (_apiKeyResult == null)
- {
- _apiKeyResult = await _apiKeyService.GetApiKeyOrNullAsync();
-
- if (_apiKeyResult == null)
- {
- return null;
- }
- }
-
+ await SetApiKeyResultAsync();
return CliUrls.GetNuGetPackageInfoUrl(_apiKeyResult.ApiKey, packageId);
}
+ private async Task SetApiKeyResultAsync()
+ {
+ _apiKeyResult ??= await _apiKeyService.GetApiKeyOrNullAsync();
+ }
+
private async Task GetLatestStableVersionOrNullAsync()
{
try
@@ -214,6 +244,12 @@ public class PackageVersionCheckerService : ITransientDependency
}
}
+ public class NuGetSearchResultDto
+ {
+ [JsonProperty("totalHits")]
+ public int TotalHits { get; set; }
+ }
+
public class NuGetVersionResultDto
{
[JsonProperty("versions")]
diff --git a/framework/src/Volo.Abp.Ddd.Domain.Shared/FodyWeavers.xml b/framework/src/Volo.Abp.Ddd.Domain.Shared/FodyWeavers.xml
new file mode 100644
index 0000000000..bc5a74a236
--- /dev/null
+++ b/framework/src/Volo.Abp.Ddd.Domain.Shared/FodyWeavers.xml
@@ -0,0 +1,3 @@
+
+
+
diff --git a/framework/src/Volo.Abp.Ddd.Domain.Shared/FodyWeavers.xsd b/framework/src/Volo.Abp.Ddd.Domain.Shared/FodyWeavers.xsd
new file mode 100644
index 0000000000..3f3946e282
--- /dev/null
+++ b/framework/src/Volo.Abp.Ddd.Domain.Shared/FodyWeavers.xsd
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.
+
+
+
+
+ A comma-separated list of error codes that can be safely ignored in assembly verification.
+
+
+
+
+ 'false' to turn off automatic generation of the XML Schema file.
+
+
+
+
+
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo.Abp.Ddd.Domain.Shared.csproj b/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo.Abp.Ddd.Domain.Shared.csproj
new file mode 100644
index 0000000000..489d2cf271
--- /dev/null
+++ b/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo.Abp.Ddd.Domain.Shared.csproj
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+ netstandard2.0;netstandard2.1;net7.0
+ Volo.Abp.Ddd.Domain.Shared
+ Volo.Abp.Ddd.Domain.Shared
+ $(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
+ false
+ false
+ false
+
+
+
+
+
+
+
+
+
diff --git a/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/AbpDddDomainSharedModule.cs b/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/AbpDddDomainSharedModule.cs
new file mode 100644
index 0000000000..3276f22310
--- /dev/null
+++ b/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/AbpDddDomainSharedModule.cs
@@ -0,0 +1,14 @@
+using Volo.Abp.EventBus.Abstractions;
+using Volo.Abp.Modularity;
+using Volo.Abp.MultiTenancy;
+
+namespace Volo.Abp.Domain;
+
+[DependsOn(
+ typeof(AbpMultiTenancyModule),
+ typeof(AbpEventBusAbstractionsModule)
+)]
+public class AbpDddDomainSharedModule : AbpModule
+{
+
+}
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/AbpDistributedEntityEventOptions.cs b/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/AbpDistributedEntityEventOptions.cs
similarity index 100%
rename from framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/AbpDistributedEntityEventOptions.cs
rename to framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/AbpDistributedEntityEventOptions.cs
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/AutoEntityDistributedEventSelectorList.cs b/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/AutoEntityDistributedEventSelectorList.cs
similarity index 100%
rename from framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/AutoEntityDistributedEventSelectorList.cs
rename to framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/AutoEntityDistributedEventSelectorList.cs
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityCreatedEto.cs b/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/EntityCreatedEto.cs
similarity index 100%
rename from framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityCreatedEto.cs
rename to framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/EntityCreatedEto.cs
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityDeletedEto.cs b/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/EntityDeletedEto.cs
similarity index 100%
rename from framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityDeletedEto.cs
rename to framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/EntityDeletedEto.cs
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityEto.cs b/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/EntityEto.cs
similarity index 100%
rename from framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityEto.cs
rename to framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/EntityEto.cs
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityUpdatedEto.cs b/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/EntityUpdatedEto.cs
similarity index 100%
rename from framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EntityUpdatedEto.cs
rename to framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/EntityUpdatedEto.cs
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EtoMappingDictionary.cs b/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/EtoMappingDictionary.cs
similarity index 91%
rename from framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EtoMappingDictionary.cs
rename to framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/EtoMappingDictionary.cs
index 18c56bfca7..bb9e362ac2 100644
--- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EtoMappingDictionary.cs
+++ b/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/EtoMappingDictionary.cs
@@ -1,6 +1,5 @@
using System;
using System.Collections.Generic;
-using Volo.Abp.EventBus.Distributed;
namespace Volo.Abp.Domain.Entities.Events.Distributed;
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EtoMappingDictionaryItem.cs b/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/EtoMappingDictionaryItem.cs
similarity index 100%
rename from framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/EtoMappingDictionaryItem.cs
rename to framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/EtoMappingDictionaryItem.cs
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/IAutoEntityDistributedEventSelectorList.cs b/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/IAutoEntityDistributedEventSelectorList.cs
similarity index 100%
rename from framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/IAutoEntityDistributedEventSelectorList.cs
rename to framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/IAutoEntityDistributedEventSelectorList.cs
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/IEntityEto.cs b/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/IEntityEto.cs
similarity index 100%
rename from framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/IEntityEto.cs
rename to framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/IEntityEto.cs
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/IEntityToEtoMapper.cs b/framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/IEntityToEtoMapper.cs
similarity index 100%
rename from framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Events/Distributed/IEntityToEtoMapper.cs
rename to framework/src/Volo.Abp.Ddd.Domain.Shared/Volo/Abp/Domain/Entities/Events/Distributed/IEntityToEtoMapper.cs
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo.Abp.Ddd.Domain.csproj b/framework/src/Volo.Abp.Ddd.Domain/Volo.Abp.Ddd.Domain.csproj
index fd80a60544..c15f7c96a8 100644
--- a/framework/src/Volo.Abp.Ddd.Domain/Volo.Abp.Ddd.Domain.csproj
+++ b/framework/src/Volo.Abp.Ddd.Domain/Volo.Abp.Ddd.Domain.csproj
@@ -15,6 +15,7 @@
+
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/AbpDddDomainModule.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/AbpDddDomainModule.cs
index 0b41fef1cf..536e31e51f 100644
--- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/AbpDddDomainModule.cs
+++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/AbpDddDomainModule.cs
@@ -22,7 +22,8 @@ namespace Volo.Abp.Domain;
typeof(AbpObjectMappingModule),
typeof(AbpExceptionHandlingModule),
typeof(AbpSpecificationsModule),
- typeof(AbpCachingModule)
+ typeof(AbpCachingModule),
+ typeof(AbpDddDomainSharedModule)
)]
public class AbpDddDomainModule : AbpModule
{
diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs
index 33fdadc9b4..0a5eaa851e 100644
--- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs
+++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs
@@ -462,7 +462,7 @@ public abstract class AbpDbContext : DbContext, IAbpEfCoreDbContext,
protected virtual void ApplyAbpConceptsForModifiedEntity(EntityEntry entry)
{
- if (entry.State == EntityState.Modified && entry.Properties.Any(x => x.IsModified && x.Metadata.ValueGenerated == ValueGenerated.Never))
+ if (entry.State == EntityState.Modified && entry.Properties.Any(x => x.IsModified && (x.Metadata.ValueGenerated == ValueGenerated.Never || x.Metadata.ValueGenerated == ValueGenerated.OnAdd)))
{
IncrementEntityVersionProperty(entry);
SetModificationAuditProperties(entry);
diff --git a/framework/src/Volo.Abp.EventBus.Abstractions/Volo.Abp.EventBus.Abstractions.csproj b/framework/src/Volo.Abp.EventBus.Abstractions/Volo.Abp.EventBus.Abstractions.csproj
index 225b9b70ee..b61d8315c1 100644
--- a/framework/src/Volo.Abp.EventBus.Abstractions/Volo.Abp.EventBus.Abstractions.csproj
+++ b/framework/src/Volo.Abp.EventBus.Abstractions/Volo.Abp.EventBus.Abstractions.csproj
@@ -9,7 +9,7 @@
-
+
diff --git a/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Abstractions/AbpEventBusAbstractionsModule.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Abstractions/AbpEventBusAbstractionsModule.cs
index 85cddf42b8..5d19fa21ba 100644
--- a/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Abstractions/AbpEventBusAbstractionsModule.cs
+++ b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Abstractions/AbpEventBusAbstractionsModule.cs
@@ -1,7 +1,11 @@
using Volo.Abp.Modularity;
+using Volo.Abp.ObjectExtending;
namespace Volo.Abp.EventBus.Abstractions;
+[DependsOn(
+ typeof(AbpObjectExtendingModule)
+)]
public class AbpEventBusAbstractionsModule : AbpModule
{
diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/IDistributedEventBus.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/IDistributedEventBus.cs
similarity index 100%
rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/IDistributedEventBus.cs
rename to framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/IDistributedEventBus.cs
diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/IEventInbox.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/IEventInbox.cs
similarity index 100%
rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/IEventInbox.cs
rename to framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/IEventInbox.cs
diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/IEventOutbox.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/IEventOutbox.cs
similarity index 100%
rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/IEventOutbox.cs
rename to framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/IEventOutbox.cs
diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/IInboxProcessor.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/IInboxProcessor.cs
similarity index 100%
rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/IInboxProcessor.cs
rename to framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/IInboxProcessor.cs
diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/IOutboxSender.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/IOutboxSender.cs
similarity index 100%
rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/IOutboxSender.cs
rename to framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/IOutboxSender.cs
diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/ISupportsEventBoxes.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/ISupportsEventBoxes.cs
similarity index 100%
rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/ISupportsEventBoxes.cs
rename to framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/ISupportsEventBoxes.cs
diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/InboxConfig.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/InboxConfig.cs
similarity index 100%
rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/InboxConfig.cs
rename to framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/InboxConfig.cs
diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/InboxConfigDictionary.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/InboxConfigDictionary.cs
similarity index 100%
rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/InboxConfigDictionary.cs
rename to framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/InboxConfigDictionary.cs
diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/IncomingEventInfo.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/IncomingEventInfo.cs
similarity index 100%
rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/IncomingEventInfo.cs
rename to framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/IncomingEventInfo.cs
diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/OutboxConfig.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/OutboxConfig.cs
similarity index 100%
rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/OutboxConfig.cs
rename to framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/OutboxConfig.cs
diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/OutboxConfigDictionary.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/OutboxConfigDictionary.cs
similarity index 100%
rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/OutboxConfigDictionary.cs
rename to framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/OutboxConfigDictionary.cs
diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/OutgoingEventInfo.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/OutgoingEventInfo.cs
similarity index 100%
rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Distributed/OutgoingEventInfo.cs
rename to framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Distributed/OutgoingEventInfo.cs
diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventBus.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/IEventBus.cs
similarity index 100%
rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventBus.cs
rename to framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/IEventBus.cs
diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventDataMayHaveTenantId.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/IEventDataMayHaveTenantId.cs
similarity index 100%
rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventDataMayHaveTenantId.cs
rename to framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/IEventDataMayHaveTenantId.cs
diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventDataWithInheritableGenericArgument.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/IEventDataWithInheritableGenericArgument.cs
similarity index 100%
rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventDataWithInheritableGenericArgument.cs
rename to framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/IEventDataWithInheritableGenericArgument.cs
diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventHandlerDisposeWrapper.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/IEventHandlerDisposeWrapper.cs
similarity index 100%
rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventHandlerDisposeWrapper.cs
rename to framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/IEventHandlerDisposeWrapper.cs
diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventHandlerFactory.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/IEventHandlerFactory.cs
similarity index 100%
rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventHandlerFactory.cs
rename to framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/IEventHandlerFactory.cs
diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventHandlerInvoker.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/IEventHandlerInvoker.cs
similarity index 100%
rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/IEventHandlerInvoker.cs
rename to framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/IEventHandlerInvoker.cs
diff --git a/framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/ILocalEventBus.cs b/framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Local/ILocalEventBus.cs
similarity index 100%
rename from framework/src/Volo.Abp.EventBus/Volo/Abp/EventBus/Local/ILocalEventBus.cs
rename to framework/src/Volo.Abp.EventBus.Abstractions/Volo/Abp/EventBus/Local/ILocalEventBus.cs
diff --git a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_MultiTenancyMiddlewareErrorPageBuilder_Tests.cs b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_MultiTenancyMiddlewareErrorPageBuilder_Tests.cs
index 8932745f29..2d2de48992 100644
--- a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_MultiTenancyMiddlewareErrorPageBuilder_Tests.cs
+++ b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancy_MultiTenancyMiddlewareErrorPageBuilder_Tests.cs
@@ -1,9 +1,10 @@
-using System.Collections.Generic;
-using System.Net;
+using System.Net;
+using System.Text.Json;
using System.Threading.Tasks;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using Shouldly;
+using Volo.Abp.Http;
using Xunit;
namespace Volo.Abp.AspNetCore.MultiTenancy;
@@ -23,4 +24,17 @@ public class AspNetCoreMultiTenancy_MultiTenancyMiddlewareErrorPageBuilder_Tests
var result = await GetResponseAsStringAsync($"http://abp.io?{_options.TenantKey}=", HttpStatusCode.NotFound);
result.ShouldNotContain("");
}
+
+ [Fact]
+ public async Task MultiTenancyMiddlewareErrorPageBuilder_Ajax_Test()
+ {
+ using (var response = await GetResponseAsync($"http://abp.io?{_options.TenantKey}=abpio", HttpStatusCode.NotFound, xmlHttpRequest: true))
+ {
+ var result = await response.Content.ReadAsStringAsync();
+ var error = JsonSerializer.Deserialize(result, new JsonSerializerOptions {PropertyNamingPolicy = JsonNamingPolicy.CamelCase});
+ error.Error.ShouldNotBeNull();
+ error.Error.Message.ShouldBe("Tenant not found!");
+ error.Error.Details.ShouldBe("There is no tenant with the tenant id or name: abpio");
+ }
+ }
}
diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Auditing/Auditing_Tests.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Auditing/Auditing_Tests.cs
index 3f6e11c02d..8ad0029cc0 100644
--- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Auditing/Auditing_Tests.cs
+++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Auditing/Auditing_Tests.cs
@@ -29,6 +29,28 @@ public class Auditing_Tests : Auditing_Tests
}));
}
+ [Fact]
+ public async Task Should_Set_Modification_If_Properties_Changed_With_Default_Value()
+ {
+ var date = DateTime.Parse("2022-01-01");
+ await WithUnitOfWorkAsync((async () =>
+ {
+ var douglas = await PersonRepository.GetAsync(TestDataBuilder.UserDouglasId);
+ douglas.HasDefaultValue = date;
+ }));
+
+ await WithUnitOfWorkAsync((async () =>
+ {
+ var douglas = await PersonRepository.FindAsync(TestDataBuilder.UserDouglasId);
+
+ douglas.ShouldNotBeNull();
+ douglas.HasDefaultValue.ShouldBe(date);
+ douglas.LastModificationTime.ShouldNotBeNull();
+ douglas.LastModificationTime.Value.ShouldBeLessThanOrEqualTo(Clock.Now);
+ douglas.LastModifierId.ShouldBe(CurrentUserId);
+ }));
+ }
+
[Fact]
public async Task Should_Set_Modification_If_Properties_Not_Generated_By_Database()
{
diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/TestMigrationsDbContext.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/TestMigrationsDbContext.cs
index 529912aa68..99e689bdd4 100644
--- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/TestMigrationsDbContext.cs
+++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/TestMigrationsDbContext.cs
@@ -20,7 +20,7 @@ public class TestMigrationsDbContext : AbpDbContext
public DbSet EntityWithIntPks { get; set; }
public DbSet Author { get; set; }
-
+
public DbSet Products { get; set; }
public TestMigrationsDbContext(DbContextOptions options)
@@ -44,6 +44,7 @@ public class TestMigrationsDbContext : AbpDbContext
modelBuilder.Entity(b =>
{
b.Property(x => x.LastActiveTime).ValueGeneratedOnAddOrUpdate().HasDefaultValue(DateTime.Now);
+ b.Property(x => x.HasDefaultValue).HasDefaultValue(DateTime.Now);
});
modelBuilder.Entity(b =>
diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/TestAppDbContext.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/TestAppDbContext.cs
index 921b97f6a4..66772343af 100644
--- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/TestAppDbContext.cs
+++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/TestApp/EntityFrameworkCore/TestAppDbContext.cs
@@ -29,7 +29,7 @@ public class TestAppDbContext : AbpDbContext, IThirdDbContext,
public DbSet Author { get; set; }
public DbSet FourthDummyEntities { get; set; }
-
+
public DbSet Products { get; set; }
public TestAppDbContext(DbContextOptions options)
@@ -60,6 +60,7 @@ public class TestAppDbContext : AbpDbContext, IThirdDbContext,
modelBuilder.Entity(b =>
{
b.Property(x => x.LastActiveTime).ValueGeneratedOnAddOrUpdate().HasDefaultValue(DateTime.Now);
+ b.Property(x => x.HasDefaultValue).HasDefaultValue(DateTime.Now);
});
modelBuilder
diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Domain/Person.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Domain/Person.cs
index 0726126eba..5d78236fca 100644
--- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Domain/Person.cs
+++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Domain/Person.cs
@@ -30,6 +30,8 @@ public class Person : FullAuditedAggregateRoot, IMultiTenant, IHasEntityVe
public virtual DateTime LastActiveTime { get; set; }
+ public virtual DateTime HasDefaultValue { get; set; }
+
public int EntityVersion { get; set; }
private Person()
diff --git a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20221216140823_Initial.Designer.cs b/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20221216140823_Initial.Designer.cs
deleted file mode 100644
index 62e4c309ca..0000000000
--- a/modules/cms-kit/host/Volo.CmsKit.Web.Unified/Migrations/20221216140823_Initial.Designer.cs
+++ /dev/null
@@ -1,2303 +0,0 @@
-//
-using System;
-using Microsoft.EntityFrameworkCore;
-using Microsoft.EntityFrameworkCore.Infrastructure;
-using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Migrations;
-using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
-using Volo.Abp.EntityFrameworkCore;
-using Volo.CmsKit.EntityFrameworkCore;
-
-#nullable disable
-
-namespace Volo.CmsKit.Migrations
-{
- [DbContext(typeof(UnifiedDbContext))]
- [Migration("20221216140823_Initial")]
- partial class Initial
- {
- ///
- protected override void BuildTargetModel(ModelBuilder modelBuilder)
- {
-#pragma warning disable 612, 618
- modelBuilder
- .HasAnnotation("_Abp_DatabaseProvider", EfCoreDatabaseProvider.SqlServer)
- .HasAnnotation("ProductVersion", "7.0.0")
- .HasAnnotation("Relational:MaxIdentifierLength", 128);
-
- SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder);
-
- modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("ApplicationName")
- .HasMaxLength(96)
- .HasColumnType("nvarchar(96)")
- .HasColumnName("ApplicationName");
-
- b.Property("BrowserInfo")
- .HasMaxLength(512)
- .HasColumnType("nvarchar(512)")
- .HasColumnName("BrowserInfo");
-
- b.Property("ClientId")
- .HasMaxLength(64)
- .HasColumnType("nvarchar(64)")
- .HasColumnName("ClientId");
-
- b.Property("ClientIpAddress")
- .HasMaxLength(64)
- .HasColumnType("nvarchar(64)")
- .HasColumnName("ClientIpAddress");
-
- b.Property("ClientName")
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)")
- .HasColumnName("ClientName");
-
- b.Property("Comments")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)")
- .HasColumnName("Comments");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasMaxLength(40)
- .HasColumnType("nvarchar(40)")
- .HasColumnName("ConcurrencyStamp");
-
- b.Property("CorrelationId")
- .HasMaxLength(64)
- .HasColumnType("nvarchar(64)")
- .HasColumnName("CorrelationId");
-
- b.Property("Exceptions")
- .HasColumnType("nvarchar(max)");
-
- b.Property("ExecutionDuration")
- .HasColumnType("int")
- .HasColumnName("ExecutionDuration");
-
- b.Property("ExecutionTime")
- .HasColumnType("datetime2");
-
- b.Property("ExtraProperties")
- .HasColumnType("nvarchar(max)")
- .HasColumnName("ExtraProperties");
-
- b.Property("HttpMethod")
- .HasMaxLength(16)
- .HasColumnType("nvarchar(16)")
- .HasColumnName("HttpMethod");
-
- b.Property("HttpStatusCode")
- .HasColumnType("int")
- .HasColumnName("HttpStatusCode");
-
- b.Property("ImpersonatorTenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("ImpersonatorTenantId");
-
- b.Property("ImpersonatorTenantName")
- .HasMaxLength(64)
- .HasColumnType("nvarchar(64)")
- .HasColumnName("ImpersonatorTenantName");
-
- b.Property("ImpersonatorUserId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("ImpersonatorUserId");
-
- b.Property("ImpersonatorUserName")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)")
- .HasColumnName("ImpersonatorUserName");
-
- b.Property("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- b.Property("TenantName")
- .HasMaxLength(64)
- .HasColumnType("nvarchar(64)")
- .HasColumnName("TenantName");
-
- b.Property("Url")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)")
- .HasColumnName("Url");
-
- b.Property("UserId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("UserId");
-
- b.Property("UserName")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)")
- .HasColumnName("UserName");
-
- b.HasKey("Id");
-
- b.HasIndex("TenantId", "ExecutionTime");
-
- b.HasIndex("TenantId", "UserId", "ExecutionTime");
-
- b.ToTable("AbpAuditLogs", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("AuditLogId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("AuditLogId");
-
- b.Property("ExecutionDuration")
- .HasColumnType("int")
- .HasColumnName("ExecutionDuration");
-
- b.Property("ExecutionTime")
- .HasColumnType("datetime2")
- .HasColumnName("ExecutionTime");
-
- b.Property("ExtraProperties")
- .HasColumnType("nvarchar(max)")
- .HasColumnName("ExtraProperties");
-
- b.Property("MethodName")
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)")
- .HasColumnName("MethodName");
-
- b.Property("Parameters")
- .HasMaxLength(2000)
- .HasColumnType("nvarchar(2000)")
- .HasColumnName("Parameters");
-
- b.Property("ServiceName")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)")
- .HasColumnName("ServiceName");
-
- b.Property("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- b.HasKey("Id");
-
- b.HasIndex("AuditLogId");
-
- b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime");
-
- b.ToTable("AbpAuditLogActions", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("AuditLogId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("AuditLogId");
-
- b.Property("ChangeTime")
- .HasColumnType("datetime2")
- .HasColumnName("ChangeTime");
-
- b.Property("ChangeType")
- .HasColumnType("tinyint")
- .HasColumnName("ChangeType");
-
- b.Property("EntityId")
- .IsRequired()
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)")
- .HasColumnName("EntityId");
-
- b.Property("EntityTenantId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("EntityTypeFullName")
- .IsRequired()
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)")
- .HasColumnName("EntityTypeFullName");
-
- b.Property("ExtraProperties")
- .HasColumnType("nvarchar(max)")
- .HasColumnName("ExtraProperties");
-
- b.Property("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- b.HasKey("Id");
-
- b.HasIndex("AuditLogId");
-
- b.HasIndex("TenantId", "EntityTypeFullName", "EntityId");
-
- b.ToTable("AbpEntityChanges", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("EntityChangeId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("NewValue")
- .HasMaxLength(512)
- .HasColumnType("nvarchar(512)")
- .HasColumnName("NewValue");
-
- b.Property("OriginalValue")
- .HasMaxLength(512)
- .HasColumnType("nvarchar(512)")
- .HasColumnName("OriginalValue");
-
- b.Property("PropertyName")
- .IsRequired()
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)")
- .HasColumnName("PropertyName");
-
- b.Property("PropertyTypeFullName")
- .IsRequired()
- .HasMaxLength(64)
- .HasColumnType("nvarchar(64)")
- .HasColumnName("PropertyTypeFullName");
-
- b.Property("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- b.HasKey("Id");
-
- b.HasIndex("EntityChangeId");
-
- b.ToTable("AbpEntityPropertyChanges", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlob", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasMaxLength(40)
- .HasColumnType("nvarchar(40)")
- .HasColumnName("ConcurrencyStamp");
-
- b.Property("ContainerId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("Content")
- .HasMaxLength(2147483647)
- .HasColumnType("varbinary(max)");
-
- b.Property("ExtraProperties")
- .HasColumnType("nvarchar(max)")
- .HasColumnName("ExtraProperties");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- b.HasKey("Id");
-
- b.HasIndex("ContainerId");
-
- b.HasIndex("TenantId", "ContainerId", "Name");
-
- b.ToTable("AbpBlobs", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.BlobStoring.Database.DatabaseBlobContainer", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasMaxLength(40)
- .HasColumnType("nvarchar(40)")
- .HasColumnName("ConcurrencyStamp");
-
- b.Property("ExtraProperties")
- .HasColumnType("nvarchar(max)")
- .HasColumnName("ExtraProperties");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)");
-
- b.Property("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- b.HasKey("Id");
-
- b.HasIndex("TenantId", "Name");
-
- b.ToTable("AbpBlobContainers", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureDefinitionRecord", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("AllowedProviders")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("DefaultValue")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("Description")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("DisplayName")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("ExtraProperties")
- .HasColumnType("nvarchar(max)")
- .HasColumnName("ExtraProperties");
-
- b.Property("GroupName")
- .IsRequired()
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)");
-
- b.Property("IsAvailableToHost")
- .HasColumnType("bit");
-
- b.Property("IsVisibleToClients")
- .HasColumnType("bit");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)");
-
- b.Property("ParentName")
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)");
-
- b.Property("ValueType")
- .HasMaxLength(2048)
- .HasColumnType("nvarchar(2048)");
-
- b.HasKey("Id");
-
- b.HasIndex("GroupName");
-
- b.HasIndex("Name")
- .IsUnique();
-
- b.ToTable("AbpFeatures", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureGroupDefinitionRecord", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("DisplayName")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("ExtraProperties")
- .HasColumnType("nvarchar(max)")
- .HasColumnName("ExtraProperties");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)");
-
- b.HasKey("Id");
-
- b.HasIndex("Name")
- .IsUnique();
-
- b.ToTable("AbpFeatureGroups", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)");
-
- b.Property("ProviderKey")
- .HasMaxLength(64)
- .HasColumnType("nvarchar(64)");
-
- b.Property("ProviderName")
- .HasMaxLength(64)
- .HasColumnType("nvarchar(64)");
-
- b.Property("Value")
- .IsRequired()
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)");
-
- b.HasKey("Id");
-
- b.HasIndex("Name", "ProviderName", "ProviderKey")
- .IsUnique()
- .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL");
-
- b.ToTable("AbpFeatureValues", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasMaxLength(40)
- .HasColumnType("nvarchar(40)")
- .HasColumnName("ConcurrencyStamp");
-
- b.Property("Description")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("ExtraProperties")
- .HasColumnType("nvarchar(max)")
- .HasColumnName("ExtraProperties");
-
- b.Property("IsStatic")
- .HasColumnType("bit");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("Regex")
- .HasMaxLength(512)
- .HasColumnType("nvarchar(512)");
-
- b.Property("RegexDescription")
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)");
-
- b.Property("Required")
- .HasColumnType("bit");
-
- b.Property("ValueType")
- .HasColumnType("int");
-
- b.HasKey("Id");
-
- b.ToTable("AbpClaimTypes", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.Identity.IdentityLinkUser", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("SourceTenantId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("SourceUserId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("TargetTenantId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("TargetUserId")
- .HasColumnType("uniqueidentifier");
-
- b.HasKey("Id");
-
- b.HasIndex("SourceUserId", "SourceTenantId", "TargetUserId", "TargetTenantId")
- .IsUnique()
- .HasFilter("[SourceTenantId] IS NOT NULL AND [TargetTenantId] IS NOT NULL");
-
- b.ToTable("AbpLinkUsers", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasMaxLength(40)
- .HasColumnType("nvarchar(40)")
- .HasColumnName("ConcurrencyStamp");
-
- b.Property("ExtraProperties")
- .HasColumnType("nvarchar(max)")
- .HasColumnName("ExtraProperties");
-
- b.Property("IsDefault")
- .HasColumnType("bit")
- .HasColumnName("IsDefault");
-
- b.Property("IsPublic")
- .HasColumnType("bit")
- .HasColumnName("IsPublic");
-
- b.Property("IsStatic")
- .HasColumnType("bit")
- .HasColumnName("IsStatic");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("NormalizedName")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- b.HasKey("Id");
-
- b.HasIndex("NormalizedName");
-
- b.ToTable("AbpRoles", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
- {
- b.Property("Id")
- .HasColumnType("uniqueidentifier");
-
- b.Property("ClaimType")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("ClaimValue")
- .HasMaxLength(1024)
- .HasColumnType("nvarchar(1024)");
-
- b.Property("RoleId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- b.HasKey("Id");
-
- b.HasIndex("RoleId");
-
- b.ToTable("AbpRoleClaims", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.Identity.IdentitySecurityLog", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("Action")
- .HasMaxLength(96)
- .HasColumnType("nvarchar(96)");
-
- b.Property("ApplicationName")
- .HasMaxLength(96)
- .HasColumnType("nvarchar(96)");
-
- b.Property("BrowserInfo")
- .HasMaxLength(512)
- .HasColumnType("nvarchar(512)");
-
- b.Property("ClientId")
- .HasMaxLength(64)
- .HasColumnType("nvarchar(64)");
-
- b.Property("ClientIpAddress")
- .HasMaxLength(64)
- .HasColumnType("nvarchar(64)");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasMaxLength(40)
- .HasColumnType("nvarchar(40)")
- .HasColumnName("ConcurrencyStamp");
-
- b.Property("CorrelationId")
- .HasMaxLength(64)
- .HasColumnType("nvarchar(64)");
-
- b.Property("CreationTime")
- .HasColumnType("datetime2");
-
- b.Property("ExtraProperties")
- .HasColumnType("nvarchar(max)")
- .HasColumnName("ExtraProperties");
-
- b.Property("Identity")
- .HasMaxLength(96)
- .HasColumnType("nvarchar(96)");
-
- b.Property("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- b.Property("TenantName")
- .HasMaxLength(64)
- .HasColumnType("nvarchar(64)");
-
- b.Property("UserId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("UserName")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.HasKey("Id");
-
- b.HasIndex("TenantId", "Action");
-
- b.HasIndex("TenantId", "ApplicationName");
-
- b.HasIndex("TenantId", "Identity");
-
- b.HasIndex("TenantId", "UserId");
-
- b.ToTable("AbpSecurityLogs", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("AccessFailedCount")
- .ValueGeneratedOnAdd()
- .HasColumnType("int")
- .HasDefaultValue(0)
- .HasColumnName("AccessFailedCount");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasMaxLength(40)
- .HasColumnType("nvarchar(40)")
- .HasColumnName("ConcurrencyStamp");
-
- b.Property("CreationTime")
- .HasColumnType("datetime2")
- .HasColumnName("CreationTime");
-
- b.Property("CreatorId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("CreatorId");
-
- b.Property("DeleterId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("DeleterId");
-
- b.Property("DeletionTime")
- .HasColumnType("datetime2")
- .HasColumnName("DeletionTime");
-
- b.Property("Email")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)")
- .HasColumnName("Email");
-
- b.Property("EmailConfirmed")
- .ValueGeneratedOnAdd()
- .HasColumnType("bit")
- .HasDefaultValue(false)
- .HasColumnName("EmailConfirmed");
-
- b.Property("ExtraProperties")
- .HasColumnType("nvarchar(max)")
- .HasColumnName("ExtraProperties");
-
- b.Property("IsActive")
- .HasColumnType("bit")
- .HasColumnName("IsActive");
-
- b.Property("IsDeleted")
- .ValueGeneratedOnAdd()
- .HasColumnType("bit")
- .HasDefaultValue(false)
- .HasColumnName("IsDeleted");
-
- b.Property("IsExternal")
- .ValueGeneratedOnAdd()
- .HasColumnType("bit")
- .HasDefaultValue(false)
- .HasColumnName("IsExternal");
-
- b.Property("LastModificationTime")
- .HasColumnType("datetime2")
- .HasColumnName("LastModificationTime");
-
- b.Property("LastModifierId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("LastModifierId");
-
- b.Property("LockoutEnabled")
- .ValueGeneratedOnAdd()
- .HasColumnType("bit")
- .HasDefaultValue(false)
- .HasColumnName("LockoutEnabled");
-
- b.Property("LockoutEnd")
- .HasColumnType("datetimeoffset");
-
- b.Property("Name")
- .HasMaxLength(64)
- .HasColumnType("nvarchar(64)")
- .HasColumnName("Name");
-
- b.Property("NormalizedEmail")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)")
- .HasColumnName("NormalizedEmail");
-
- b.Property("NormalizedUserName")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)")
- .HasColumnName("NormalizedUserName");
-
- b.Property("PasswordHash")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)")
- .HasColumnName("PasswordHash");
-
- b.Property("PhoneNumber")
- .HasMaxLength(16)
- .HasColumnType("nvarchar(16)")
- .HasColumnName("PhoneNumber");
-
- b.Property("PhoneNumberConfirmed")
- .ValueGeneratedOnAdd()
- .HasColumnType("bit")
- .HasDefaultValue(false)
- .HasColumnName("PhoneNumberConfirmed");
-
- b.Property("SecurityStamp")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)")
- .HasColumnName("SecurityStamp");
-
- b.Property("Surname")
- .HasMaxLength(64)
- .HasColumnType("nvarchar(64)")
- .HasColumnName("Surname");
-
- b.Property("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- b.Property("TwoFactorEnabled")
- .ValueGeneratedOnAdd()
- .HasColumnType("bit")
- .HasDefaultValue(false)
- .HasColumnName("TwoFactorEnabled");
-
- b.Property("UserName")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)")
- .HasColumnName("UserName");
-
- b.HasKey("Id");
-
- b.HasIndex("Email");
-
- b.HasIndex("NormalizedEmail");
-
- b.HasIndex("NormalizedUserName");
-
- b.HasIndex("UserName");
-
- b.ToTable("AbpUsers", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
- {
- b.Property("Id")
- .HasColumnType("uniqueidentifier");
-
- b.Property("ClaimType")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("ClaimValue")
- .HasMaxLength(1024)
- .HasColumnType("nvarchar(1024)");
-
- b.Property("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- b.Property("UserId")
- .HasColumnType("uniqueidentifier");
-
- b.HasKey("Id");
-
- b.HasIndex("UserId");
-
- b.ToTable("AbpUserClaims", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
- {
- b.Property("UserId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("LoginProvider")
- .HasMaxLength(64)
- .HasColumnType("nvarchar(64)");
-
- b.Property("ProviderDisplayName")
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)");
-
- b.Property("ProviderKey")
- .IsRequired()
- .HasMaxLength(196)
- .HasColumnType("nvarchar(196)");
-
- b.Property("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- b.HasKey("UserId", "LoginProvider");
-
- b.HasIndex("LoginProvider", "ProviderKey");
-
- b.ToTable("AbpUserLogins", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.Identity.IdentityUserOrganizationUnit", b =>
- {
- b.Property("OrganizationUnitId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("UserId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("CreationTime")
- .HasColumnType("datetime2")
- .HasColumnName("CreationTime");
-
- b.Property("CreatorId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("CreatorId");
-
- b.Property("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- b.HasKey("OrganizationUnitId", "UserId");
-
- b.HasIndex("UserId", "OrganizationUnitId");
-
- b.ToTable("AbpUserOrganizationUnits", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
- {
- b.Property("UserId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("RoleId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- b.HasKey("UserId", "RoleId");
-
- b.HasIndex("RoleId", "UserId");
-
- b.ToTable("AbpUserRoles", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
- {
- b.Property("UserId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("LoginProvider")
- .HasMaxLength(64)
- .HasColumnType("nvarchar(64)");
-
- b.Property("Name")
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)");
-
- b.Property("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- b.Property("Value")
- .HasColumnType("nvarchar(max)");
-
- b.HasKey("UserId", "LoginProvider", "Name");
-
- b.ToTable("AbpUserTokens", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnit", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("Code")
- .IsRequired()
- .HasMaxLength(95)
- .HasColumnType("nvarchar(95)")
- .HasColumnName("Code");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasMaxLength(40)
- .HasColumnType("nvarchar(40)")
- .HasColumnName("ConcurrencyStamp");
-
- b.Property("CreationTime")
- .HasColumnType("datetime2")
- .HasColumnName("CreationTime");
-
- b.Property("CreatorId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("CreatorId");
-
- b.Property("DeleterId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("DeleterId");
-
- b.Property("DeletionTime")
- .HasColumnType("datetime2")
- .HasColumnName("DeletionTime");
-
- b.Property("DisplayName")
- .IsRequired()
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)")
- .HasColumnName("DisplayName");
-
- b.Property("ExtraProperties")
- .HasColumnType("nvarchar(max)")
- .HasColumnName("ExtraProperties");
-
- b.Property("IsDeleted")
- .ValueGeneratedOnAdd()
- .HasColumnType("bit")
- .HasDefaultValue(false)
- .HasColumnName("IsDeleted");
-
- b.Property("LastModificationTime")
- .HasColumnType("datetime2")
- .HasColumnName("LastModificationTime");
-
- b.Property("LastModifierId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("LastModifierId");
-
- b.Property("ParentId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- b.HasKey("Id");
-
- b.HasIndex("Code");
-
- b.HasIndex("ParentId");
-
- b.ToTable("AbpOrganizationUnits", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.Identity.OrganizationUnitRole", b =>
- {
- b.Property("OrganizationUnitId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("RoleId")
- .HasColumnType("uniqueidentifier");
-
- b.Property("CreationTime")
- .HasColumnType("datetime2")
- .HasColumnName("CreationTime");
-
- b.Property("CreatorId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("CreatorId");
-
- b.Property("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- b.HasKey("OrganizationUnitId", "RoleId");
-
- b.HasIndex("RoleId", "OrganizationUnitId");
-
- b.ToTable("AbpOrganizationUnitRoles", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionDefinitionRecord", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("DisplayName")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("ExtraProperties")
- .HasColumnType("nvarchar(max)")
- .HasColumnName("ExtraProperties");
-
- b.Property("GroupName")
- .IsRequired()
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)");
-
- b.Property("IsEnabled")
- .HasColumnType("bit");
-
- b.Property("MultiTenancySide")
- .HasColumnType("tinyint");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)");
-
- b.Property("ParentName")
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)");
-
- b.Property("Providers")
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)");
-
- b.Property("StateCheckers")
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.HasKey("Id");
-
- b.HasIndex("GroupName");
-
- b.HasIndex("Name")
- .IsUnique();
-
- b.ToTable("AbpPermissions", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGrant", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)");
-
- b.Property("ProviderKey")
- .IsRequired()
- .HasMaxLength(64)
- .HasColumnType("nvarchar(64)");
-
- b.Property("ProviderName")
- .IsRequired()
- .HasMaxLength(64)
- .HasColumnType("nvarchar(64)");
-
- b.Property("TenantId")
- .HasColumnType("uniqueidentifier")
- .HasColumnName("TenantId");
-
- b.HasKey("Id");
-
- b.HasIndex("TenantId", "Name", "ProviderName", "ProviderKey")
- .IsUnique()
- .HasFilter("[TenantId] IS NOT NULL");
-
- b.ToTable("AbpPermissionGrants", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.PermissionManagement.PermissionGroupDefinitionRecord", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("DisplayName")
- .IsRequired()
- .HasMaxLength(256)
- .HasColumnType("nvarchar(256)");
-
- b.Property("ExtraProperties")
- .HasColumnType("nvarchar(max)")
- .HasColumnName("ExtraProperties");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)");
-
- b.HasKey("Id");
-
- b.HasIndex("Name")
- .IsUnique();
-
- b.ToTable("AbpPermissionGroups", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.SettingManagement.Setting", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("Name")
- .IsRequired()
- .HasMaxLength(128)
- .HasColumnType("nvarchar(128)");
-
- b.Property("ProviderKey")
- .HasMaxLength(64)
- .HasColumnType("nvarchar(64)");
-
- b.Property("ProviderName")
- .HasMaxLength(64)
- .HasColumnType("nvarchar(64)");
-
- b.Property("Value")
- .IsRequired()
- .HasMaxLength(2048)
- .HasColumnType("nvarchar(2048)");
-
- b.HasKey("Id");
-
- b.HasIndex("Name", "ProviderName", "ProviderKey")
- .IsUnique()
- .HasFilter("[ProviderName] IS NOT NULL AND [ProviderKey] IS NOT NULL");
-
- b.ToTable("AbpSettings", (string)null);
- });
-
- modelBuilder.Entity("Volo.Abp.TenantManagement.Tenant", b =>
- {
- b.Property("Id")
- .ValueGeneratedOnAdd()
- .HasColumnType("uniqueidentifier");
-
- b.Property("ConcurrencyStamp")
- .IsConcurrencyToken()
- .HasMaxLength(40)
- .HasColumnType("nvarchar(40)")
- .HasColumnName("ConcurrencyStamp");
-
- b.Property("CreationTime")
- .HasColumnType("datetime2")
- .HasColumnName("CreationTime");
-
- b.Property