diff --git a/common.test.props b/common.test.props
new file mode 100644
index 0000000000..e90103e606
--- /dev/null
+++ b/common.test.props
@@ -0,0 +1,10 @@
+
+
+ latest
+ $(NoWarn);CS1591
+ true
+ false
+ false
+ false
+
+
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj b/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj
index 7d8a961507..e4b8bae75f 100644
--- a/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj
+++ b/framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.AspNetCore.Authentication.JwtBearer
Volo.Abp.AspNetCore.Authentication.JwtBearer
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
@@ -18,7 +18,7 @@
-
+
diff --git a/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Properties/launchSettings.json b/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Properties/launchSettings.json
new file mode 100644
index 0000000000..fcbf86698d
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:53450/",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "Volo.Abp.AspNetCore.Authentication.OAuth": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "http://localhost:53451/"
+ }
+ }
+}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Volo.Abp.AspNetCore.Authentication.OAuth.csproj b/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Volo.Abp.AspNetCore.Authentication.OAuth.csproj
index 54c93df3ec..8541a681f0 100644
--- a/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Volo.Abp.AspNetCore.Authentication.OAuth.csproj
+++ b/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Volo.Abp.AspNetCore.Authentication.OAuth.csproj
@@ -1,15 +1,17 @@
-
+
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.AspNetCore.Authentication.OAuth
Volo.Abp.AspNetCore.Authentication.OAuth
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
false
false
false
+ true
+ Library
@@ -17,8 +19,4 @@
-
-
-
-
-
+
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Volo/Abp/AspNetCore/Authentication/OAuth/Claims/MultipleClaimAction.cs b/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Volo/Abp/AspNetCore/Authentication/OAuth/Claims/MultipleClaimAction.cs
index 742f91d057..074cc936d0 100644
--- a/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Volo/Abp/AspNetCore/Authentication/OAuth/Claims/MultipleClaimAction.cs
+++ b/framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Volo/Abp/AspNetCore/Authentication/OAuth/Claims/MultipleClaimAction.cs
@@ -1,6 +1,6 @@
using System.Security.Claims;
+using System.Text.Json;
using Microsoft.AspNetCore.Authentication.OAuth.Claims;
-using Newtonsoft.Json.Linq;
namespace Volo.Abp.AspNetCore.Authentication.OAuth.Claims
{
@@ -9,31 +9,30 @@ namespace Volo.Abp.AspNetCore.Authentication.OAuth.Claims
public MultipleClaimAction(string claimType, string jsonKey)
: base(claimType, jsonKey)
{
+
}
- public override void Run(JObject userData, ClaimsIdentity identity, string issuer)
- {
- var prop = userData?.Property(ValueType);
- if (prop == null)
+ public override void Run(JsonElement userData, ClaimsIdentity identity, string issuer)
+ {
+ var prop = userData.GetProperty(ValueType);
+ if (prop.ValueKind == JsonValueKind.Null)
{
return;
}
- var propValue = prop.Value;
-
- switch (propValue.Type)
+ switch (prop.ValueKind)
{
- case JTokenType.String:
- identity.AddClaim(new Claim(ClaimType, propValue.Value(), ValueType, issuer));
+ case JsonValueKind.String:
+ identity.AddClaim(new Claim(ClaimType, prop.GetString(), ValueType, issuer));
break;
- case JTokenType.Array:
- foreach (var innterValue in propValue.Values())
+ case JsonValueKind.Array:
+ foreach (var arramItem in prop.EnumerateArray())
{
- identity.AddClaim(new Claim(ClaimType, innterValue, ValueType, issuer));
+ identity.AddClaim(new Claim(ClaimType, arramItem.GetString(), ValueType, issuer));
}
break;
default:
- throw new AbpException("Unhandled JTokenType: " + propValue.Type);
+ throw new AbpException("Unhandled JsonValueKind: " + prop.ValueKind);
}
}
}
diff --git a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Properties/launchSettings.json b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Properties/launchSettings.json
new file mode 100644
index 0000000000..67c494aa28
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:53760/",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "Volo.Abp.AspNetCore.MultiTenancy": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "http://localhost:53763/"
+ }
+ }
+}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo.Abp.AspNetCore.MultiTenancy.csproj b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo.Abp.AspNetCore.MultiTenancy.csproj
index 6904fe07b1..384aaa262e 100644
--- a/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo.Abp.AspNetCore.MultiTenancy.csproj
+++ b/framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo.Abp.AspNetCore.MultiTenancy.csproj
@@ -1,15 +1,17 @@
-
+
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.AspNetCore.MultiTenancy
Volo.Abp.AspNetCore.MultiTenancy
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
false
false
false
+ true
+ Library
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Properties/launchSettings.json b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Properties/launchSettings.json
new file mode 100644
index 0000000000..e17b14d87f
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:52302/",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "Volo.Abp.AspNetCore.Mvc.Client": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "http://localhost:52303/"
+ }
+ }
+}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo.Abp.AspNetCore.Mvc.Client.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo.Abp.AspNetCore.Mvc.Client.csproj
index 9d05c9e34b..253bf0d288 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo.Abp.AspNetCore.Mvc.Client.csproj
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo.Abp.AspNetCore.Mvc.Client.csproj
@@ -1,15 +1,17 @@
-
+
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.AspNetCore.Mvc.Client
Volo.Abp.AspNetCore.Mvc.Client
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
false
false
false
+ true
+ Library
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/CachedApplicationConfigurationClient.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/CachedApplicationConfigurationClient.cs
index 4ceb8bdd1c..838150fd49 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/CachedApplicationConfigurationClient.cs
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/CachedApplicationConfigurationClient.cs
@@ -13,8 +13,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Client
{
public class CachedApplicationConfigurationClient : ICachedApplicationConfigurationClient, ITransientDependency
{
- public IHttpContextAccessor HttpContextAccessor { get; set; }
-
+ protected IHttpContextAccessor HttpContextAccessor { get; }
protected IHttpClientProxy Proxy { get; }
protected ICurrentUser CurrentUser { get; }
protected IDistributedCache Cache { get; }
@@ -42,11 +41,11 @@ namespace Volo.Abp.AspNetCore.Mvc.Client
}
configuration = await Cache.GetOrAddAsync(
- CreateCacheKey(),
+ cacheKey,
async () => await Proxy.Service.GetAsync(),
() => new DistributedCacheEntryOptions
{
- AbsoluteExpirationRelativeToNow = TimeSpan.FromSeconds(60) //TODO: Should be configurable. Default value should be higher (5 mins would be good).
+ AbsoluteExpirationRelativeToNow = TimeSpan.FromSeconds(120) //TODO: Should be configurable. Default value should be higher (5 mins would be good).
}
);
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteTenantStore.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteTenantStore.cs
new file mode 100644
index 0000000000..718abbb6a9
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo/Abp/AspNetCore/Mvc/Client/RemoteTenantStore.cs
@@ -0,0 +1,116 @@
+using System;
+using System.Threading.Tasks;
+using Microsoft.AspNetCore.Http;
+using Microsoft.Extensions.Caching.Distributed;
+using Volo.Abp.AspNetCore.Mvc.MultiTenancy;
+using Volo.Abp.Caching;
+using Volo.Abp.DependencyInjection;
+using Volo.Abp.Http.Client.DynamicProxying;
+using Volo.Abp.MultiTenancy;
+using Volo.Abp.Threading;
+
+namespace Volo.Abp.AspNetCore.Mvc.Client
+{
+ public class RemoteTenantStore : ITenantStore, ITransientDependency
+ {
+ protected IHttpClientProxy Proxy { get; }
+ protected IHttpContextAccessor HttpContextAccessor { get; }
+ protected IDistributedCache Cache { get; }
+
+ public RemoteTenantStore(
+ IHttpClientProxy proxy,
+ IHttpContextAccessor httpContextAccessor,
+ IDistributedCache cache)
+ {
+ Proxy = proxy;
+ HttpContextAccessor = httpContextAccessor;
+ Cache = cache;
+ }
+
+ public async Task FindAsync(string name)
+ {
+ var cacheKey = CreateCacheKey(name);
+ var httpContext = HttpContextAccessor?.HttpContext;
+
+ if (httpContext != null && httpContext.Items[cacheKey] is TenantConfiguration tenantConfiguration)
+ {
+ return tenantConfiguration;
+ }
+
+ tenantConfiguration = await Cache.GetOrAddAsync(
+ cacheKey,
+ async () => CreateTenantConfiguration(await Proxy.Service.FindTenantByNameAsync(name)),
+ () => new DistributedCacheEntryOptions
+ {
+ AbsoluteExpirationRelativeToNow =
+ TimeSpan.FromMinutes(5) //TODO: Should be configurable.
+ }
+ );
+
+ if (httpContext != null)
+ {
+ httpContext.Items[cacheKey] = tenantConfiguration;
+ }
+
+ return tenantConfiguration;
+ }
+
+ public async Task FindAsync(Guid id)
+ {
+ var cacheKey = CreateCacheKey(id);
+ var httpContext = HttpContextAccessor?.HttpContext;
+
+ if (httpContext != null && httpContext.Items[cacheKey] is TenantConfiguration tenantConfiguration)
+ {
+ return tenantConfiguration;
+ }
+
+ tenantConfiguration = await Cache.GetOrAddAsync(
+ cacheKey,
+ async () => CreateTenantConfiguration(await Proxy.Service.FindTenantByIdAsync(id)),
+ () => new DistributedCacheEntryOptions
+ {
+ AbsoluteExpirationRelativeToNow =
+ TimeSpan.FromMinutes(5) //TODO: Should be configurable.
+ }
+ );
+
+ if (httpContext != null)
+ {
+ httpContext.Items[cacheKey] = tenantConfiguration;
+ }
+
+ return tenantConfiguration;
+ }
+
+ public TenantConfiguration Find(string name)
+ {
+ return AsyncHelper.RunSync(() => FindAsync(name));
+ }
+
+ public TenantConfiguration Find(Guid id)
+ {
+ return AsyncHelper.RunSync(() => FindAsync(id));
+ }
+
+ protected virtual TenantConfiguration CreateTenantConfiguration(FindTenantResultDto tenantResultDto)
+ {
+ if (!tenantResultDto.Success || tenantResultDto.TenantId == null)
+ {
+ return null;
+ }
+
+ return new TenantConfiguration(tenantResultDto.TenantId.Value, tenantResultDto.Name);
+ }
+
+ protected virtual string CreateCacheKey(string tenantName)
+ {
+ return $"RemoteTenantStore_Name_{tenantName}";
+ }
+
+ protected virtual string CreateCacheKey(Guid tenantId)
+ {
+ return $"RemoteTenantStore_Id_{tenantId:N}";
+ }
+ }
+}
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo.Abp.AspNetCore.Mvc.Contracts.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo.Abp.AspNetCore.Mvc.Contracts.csproj
index 8141097dc6..173ff3cfbe 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo.Abp.AspNetCore.Mvc.Contracts.csproj
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo.Abp.AspNetCore.Mvc.Contracts.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.AspNetCore.Mvc.Contracts
Volo.Abp.AspNetCore.Mvc.Contracts
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/MultiTenancy/FindTenantResultDto.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/MultiTenancy/FindTenantResultDto.cs
new file mode 100644
index 0000000000..d85622f0cf
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/MultiTenancy/FindTenantResultDto.cs
@@ -0,0 +1,14 @@
+using System;
+
+namespace Volo.Abp.AspNetCore.Mvc.MultiTenancy
+{
+ [Serializable]
+ public class FindTenantResultDto
+ {
+ public bool Success { get; set; }
+
+ public Guid? TenantId { get; set; }
+
+ public string Name { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/MultiTenancy/IAbpTenantAppService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/MultiTenancy/IAbpTenantAppService.cs
new file mode 100644
index 0000000000..eb02e84ceb
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.Contracts/Volo/Abp/AspNetCore/Mvc/MultiTenancy/IAbpTenantAppService.cs
@@ -0,0 +1,13 @@
+using System;
+using System.Threading.Tasks;
+using Volo.Abp.Application.Services;
+
+namespace Volo.Abp.AspNetCore.Mvc.MultiTenancy
+{
+ public interface IAbpTenantAppService : IApplicationService
+ {
+ Task FindTenantByNameAsync(string name);
+
+ Task FindTenantByIdAsync(Guid id);
+ }
+}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj
index b9e1538272..f0eabc0025 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj
@@ -1,13 +1,13 @@
-
+
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
- true
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
+ true
Library
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Properties/launchSettings.json b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Properties/launchSettings.json
new file mode 100644
index 0000000000..7bcd0a8aff
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:53762/",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "Volo.Abp.AspNetCore.Mvc.UI.Bundling": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "http://localhost:53765/"
+ }
+ }
+}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj
index 579d3a659b..4427b40dd6 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj
@@ -1,11 +1,13 @@
-
+
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.AspNetCore.Mvc.UI.Bundling
Volo.Abp.AspNetCore.Mvc.UI.Bundling
+ true
+ Library
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleManager.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleManager.cs
index 3f99614aa9..35bf730d70 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleManager.cs
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/BundleManager.cs
@@ -4,6 +4,7 @@ using System.Collections.Immutable;
using System.Linq;
using System.Text;
using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Extensions.Options;
@@ -23,7 +24,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling
protected readonly BundlingOptions Options;
protected readonly BundleContributorOptions ContributorOptions;
protected readonly IWebContentFileProvider WebContentFileProvider;
- protected readonly IHostingEnvironment HostingEnvironment;
+ protected readonly IWebHostEnvironment HostingEnvironment;
protected readonly IScriptBundler ScriptBundler;
protected readonly IStyleBundler StyleBundler;
protected readonly IServiceProvider ServiceProvider;
@@ -36,7 +37,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling
IOptions contributorOptions,
IScriptBundler scriptBundler,
IStyleBundler styleBundler,
- IHostingEnvironment hostingEnvironment,
+ IWebHostEnvironment hostingEnvironment,
IServiceProvider serviceProvider,
IDynamicFileProvider dynamicFileProvider,
IBundleCache bundleCache,
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Styles/StyleBundler.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Styles/StyleBundler.cs
index 31c3f1dacf..ac33211860 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Styles/StyleBundler.cs
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/Styles/StyleBundler.cs
@@ -8,10 +8,10 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.Styles
{
public class StyleBundler : BundlerBase, IStyleBundler
{
- private readonly IHostingEnvironment _hostingEnvironment;
+ private readonly IWebHostEnvironment _hostingEnvironment;
public override string FileExtension => "css";
- public StyleBundler(IWebContentFileProvider webContentFileProvider, ICssMinifier minifier, IHostingEnvironment hostingEnvironment)
+ public StyleBundler(IWebContentFileProvider webContentFileProvider, ICssMinifier minifier, IWebHostEnvironment hostingEnvironment)
: base(webContentFileProvider, minifier)
{
_hostingEnvironment = hostingEnvironment;
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs
index 2224198dc4..981da4e4da 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperResourceService.cs
@@ -19,14 +19,14 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers
protected IBundleManager BundleManager { get; }
protected IWebContentFileProvider WebContentFileProvider { get; }
- protected IHostingEnvironment HostingEnvironment { get; }
+ protected IWebHostEnvironment HostingEnvironment { get; }
protected readonly BundlingOptions Options;
protected AbpTagHelperResourceService(
IBundleManager bundleManager,
IWebContentFileProvider webContentFileProvider,
- IOptions options,
- IHostingEnvironment hostingEnvironment)
+ IOptions options,
+ IWebHostEnvironment hostingEnvironment)
{
BundleManager = bundleManager;
WebContentFileProvider = webContentFileProvider;
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs
index b4f2ba1b77..8c8e2abc5a 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperScriptService.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Razor.TagHelpers;
+using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.VirtualFileSystem;
@@ -14,7 +15,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers
IBundleManager bundleManager,
IWebContentFileProvider webContentFileProvider,
IOptions options,
- IHostingEnvironment hostingEnvironment
+ IWebHostEnvironment hostingEnvironment
) : base(
bundleManager,
webContentFileProvider,
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs
index 2a0946cfd2..400a75553f 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo/Abp/AspNetCore/Mvc/UI/Bundling/TagHelpers/AbpTagHelperStyleService.cs
@@ -3,6 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Razor.TagHelpers;
+using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
using Volo.Abp.AspNetCore.VirtualFileSystem;
@@ -14,7 +15,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bundling.TagHelpers
IBundleManager bundleManager,
IWebContentFileProvider webContentFileProvider,
IOptions options,
- IHostingEnvironment hostingEnvironment
+ IWebHostEnvironment hostingEnvironment
) : base(
bundleManager,
webContentFileProvider,
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/AbpTenantAppService.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/AbpTenantAppService.cs
new file mode 100644
index 0000000000..d0bea87196
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/AbpTenantAppService.cs
@@ -0,0 +1,52 @@
+using System;
+using System.Threading.Tasks;
+using Volo.Abp.Application.Services;
+using Volo.Abp.AspNetCore.Mvc.MultiTenancy;
+using Volo.Abp.MultiTenancy;
+
+namespace Pages.Abp.MultiTenancy
+{
+ public class AbpTenantAppService : ApplicationService, IAbpTenantAppService
+ {
+ protected ITenantStore TenantStore { get; }
+
+ public AbpTenantAppService(ITenantStore tenantStore)
+ {
+ TenantStore = tenantStore;
+ }
+
+ public async Task FindTenantByNameAsync(string name)
+ {
+ var tenant = await TenantStore.FindAsync(name);
+
+ if (tenant == null)
+ {
+ return new FindTenantResultDto { Success = false };
+ }
+
+ return new FindTenantResultDto
+ {
+ Success = true,
+ TenantId = tenant.Id,
+ Name = tenant.Name
+ };
+ }
+
+ public async Task FindTenantByIdAsync(Guid id)
+ {
+ var tenant = await TenantStore.FindAsync(id);
+
+ if (tenant == null)
+ {
+ return new FindTenantResultDto { Success = false };
+ }
+
+ return new FindTenantResultDto
+ {
+ Success = true,
+ TenantId = tenant.Id,
+ Name = tenant.Name
+ };
+ }
+ }
+}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/AbpTenantController.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/AbpTenantController.cs
index d42cf82f9b..5da47875d9 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/AbpTenantController.cs
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/AbpTenantController.cs
@@ -1,37 +1,34 @@
-using System.Threading.Tasks;
+using System;
+using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
-using Volo.Abp.MultiTenancy;
+using Volo.Abp.AspNetCore.Mvc.MultiTenancy;
namespace Pages.Abp.MultiTenancy
{
[Route("api/abp/multi-tenancy")]
- public class AbpTenantController : AbpController
+ public class AbpTenantController : AbpController, IAbpTenantAppService
{
+ private readonly IAbpTenantAppService _abpTenantAppService;
- protected ITenantStore TenantStore { get; }
-
- public AbpTenantController(ITenantStore tenantStore)
+ public AbpTenantController(IAbpTenantAppService abpTenantAppService)
{
- TenantStore = tenantStore;
+ _abpTenantAppService = abpTenantAppService;
}
[HttpGet]
- [Route("find-tenant/{name}")]
- public async Task FindTenantAsync(string name)
+ [Route("find-tenant/{name}")] //TODO: Remove on v1.0
+ [Route("tenants/by-name/{name}")]
+ public async Task FindTenantByNameAsync(string name)
{
- var tenant = await TenantStore.FindAsync(name);
-
- if (tenant == null)
- {
- return new FindTenantResult{Success = false};
- }
+ return await _abpTenantAppService.FindTenantByNameAsync(name);
+ }
- return new FindTenantResult
- {
- Success = true,
- TenantId = tenant.Id
- };
+ [HttpGet]
+ [Route("tenants/by-id/{id}")]
+ public async Task FindTenantByIdAsync(Guid id)
+ {
+ return await _abpTenantAppService.FindTenantByIdAsync(id);
}
}
}
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/FindTenantResult.cs b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/FindTenantResult.cs
deleted file mode 100644
index 59aef8335e..0000000000
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Pages/Abp/MultiTenancy/FindTenantResult.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using System;
-
-namespace Pages.Abp.MultiTenancy
-{
- public class FindTenantResult
- {
- public bool Success { get; set; }
-
- public Guid? TenantId { get; set; }
- }
-}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.csproj
index d0015b0e57..d55e9ec2df 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.csproj
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.csproj
@@ -1,9 +1,9 @@
-
+
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy
Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Properties/launchSettings.json b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Properties/launchSettings.json
new file mode 100644
index 0000000000..4ae9c1d2f1
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:53766/",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "Volo.Abp.AspNetCore.Mvc.UI.Packages": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "http://localhost:53768/"
+ }
+ }
+}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo.Abp.AspNetCore.Mvc.UI.Packages.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo.Abp.AspNetCore.Mvc.UI.Packages.csproj
index cc4db153d6..b91f36abf0 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo.Abp.AspNetCore.Mvc.UI.Packages.csproj
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo.Abp.AspNetCore.Mvc.UI.Packages.csproj
@@ -1,11 +1,13 @@
-
+
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.AspNetCore.Mvc.UI.Packages
Volo.Abp.AspNetCore.Mvc.UI.Packages
+ true
+ Library
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj
index 654b191bec..f12072816a 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj
@@ -1,9 +1,9 @@
-
+
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic
Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj
index 898d7c1a0d..258feaf64a 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj
@@ -1,9 +1,9 @@
-
+
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared
Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
@@ -32,10 +32,6 @@
-
-
-
-
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Properties/launchSettings.json b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Properties/launchSettings.json
new file mode 100644
index 0000000000..e9779c3c37
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:53761/",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "Volo.Abp.AspNetCore.Mvc.UI.Widgets": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "http://localhost:53764/"
+ }
+ }
+}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo.Abp.AspNetCore.Mvc.UI.Widgets.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo.Abp.AspNetCore.Mvc.UI.Widgets.csproj
index ae41d65026..75b83faaf2 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo.Abp.AspNetCore.Mvc.UI.Widgets.csproj
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo.Abp.AspNetCore.Mvc.UI.Widgets.csproj
@@ -1,11 +1,13 @@
-
+
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.AspNetCore.Mvc.UI.Widgets
Volo.Abp.AspNetCore.Mvc.UI.Widgets
+ true
+ Library
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj
index 34367260f9..03e3d2bbd8 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj
@@ -1,12 +1,14 @@
-
+
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.AspNetCore.Mvc.UI
Volo.Abp.AspNetCore.Mvc.UI
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
+ true
+ Library
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Microsoft/AspNetCore/Builder/AbpAspNetCoreMvcApplicationBuilderExtensions.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Microsoft/AspNetCore/Builder/AbpAspNetCoreMvcApplicationBuilderExtensions.cs
index 8b1f6e9d49..9a19337c5f 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc/Microsoft/AspNetCore/Builder/AbpAspNetCoreMvcApplicationBuilderExtensions.cs
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Microsoft/AspNetCore/Builder/AbpAspNetCoreMvcApplicationBuilderExtensions.cs
@@ -17,19 +17,15 @@ namespace Microsoft.AspNetCore.Builder
/// A reference to this instance after the operation has completed.
public static IApplicationBuilder UseMvcWithDefaultRouteAndArea(
this IApplicationBuilder app,
- Action additionalConfigurationAction = null)
+ Action additionalConfigurationAction = null)
{
- return app.UseMvc(routes =>
+ return app.UseEndpoints(endpoints =>
{
- routes.MapRoute(
- name: "defaultWithArea",
- template: "{area}/{controller=Home}/{action=Index}/{id?}");
+ endpoints.MapControllerRoute("defaultWithArea", "{area}/{controller=Home}/{action=Index}/{id?}");
+ endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}");
+ endpoints.MapRazorPages();
- routes.MapRoute(
- name: "default",
- template: "{controller=Home}/{action=Index}/{id?}");
-
- additionalConfigurationAction?.Invoke(routes);
+ additionalConfigurationAction?.Invoke(endpoints);
});
}
}
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Properties/launchSettings.json b/framework/src/Volo.Abp.AspNetCore.Mvc/Properties/launchSettings.json
new file mode 100644
index 0000000000..3c84fd21f2
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:53767/",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "Volo.Abp.AspNetCore.Mvc": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "http://localhost:53769/"
+ }
+ }
+}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj
index 138189864b..1a8e8cb18d 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj
@@ -1,15 +1,17 @@
-
+
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.AspNetCore.Mvc
Volo.Abp.AspNetCore.Mvc
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
false
false
false
+ true
+ Library
@@ -22,8 +24,8 @@
-
-
+
+
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcModule.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcModule.cs
index fa317d7211..b094505f6c 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcModule.cs
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcModule.cs
@@ -3,12 +3,11 @@ using Microsoft.AspNetCore.Mvc.ApplicationParts;
using Microsoft.AspNetCore.Mvc.Controllers;
using Microsoft.AspNetCore.Mvc.Filters;
using Microsoft.AspNetCore.Mvc.Infrastructure;
-using Microsoft.AspNetCore.Mvc.Razor;
using Microsoft.AspNetCore.Mvc.ViewComponents;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Options;
-using Newtonsoft.Json.Serialization;
+using Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -16,7 +15,6 @@ using System.Reflection;
using Volo.Abp.ApiVersioning;
using Volo.Abp.AspNetCore.Mvc.Conventions;
using Volo.Abp.AspNetCore.Mvc.DependencyInjection;
-using Volo.Abp.AspNetCore.Mvc.Json;
using Volo.Abp.AspNetCore.Mvc.Localization;
using Volo.Abp.AspNetCore.VirtualFileSystem;
using Volo.Abp.DependencyInjection;
@@ -45,8 +43,8 @@ namespace Volo.Abp.AspNetCore.Mvc
{
//Configure Razor
context.Services.Insert(0,
- ServiceDescriptor.Singleton>(
- new ConfigureOptions(options =>
+ ServiceDescriptor.Singleton>(
+ new ConfigureOptions(options =>
{
options.FileProviders.Add(
new RazorViewEngineVirtualFileProvider(
@@ -78,6 +76,7 @@ namespace Volo.Abp.AspNetCore.Mvc
);
var mvcBuilder = context.Services.AddMvc()
+ .AddRazorRuntimeCompilation()
.AddDataAnnotationsLocalization(options =>
{
@@ -86,7 +85,7 @@ namespace Volo.Abp.AspNetCore.Mvc
var resourceType = abpMvcDataAnnotationsLocalizationOptions.AssemblyResources.GetOrDefault(type.Assembly);
return factory.Create(resourceType ?? type);
};
- })
+ })
.AddViewLocalization(); //TODO: How to configure from the application? Also, consider to move to a UI module since APIs does not care about it.
context.Services.ExecutePreConfiguredActions(mvcBuilder);
@@ -112,10 +111,10 @@ namespace Volo.Abp.AspNetCore.Mvc
mvcOptions.AddAbp(context.Services);
});
- Configure(jsonOptions =>
- {
- jsonOptions.SerializerSettings.ContractResolver = new AbpMvcJsonContractResolver(context.Services);
- });
+ //Configure(jsonOptions => @3.0.0!
+ //{
+ // jsonOptions.SerializerSettings.ContractResolver = new AbpMvcJsonContractResolver(context.Services);
+ //});
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/AbpServiceConvention.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/AbpServiceConvention.cs
index 2d04e316cb..621072b6ba 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/AbpServiceConvention.cs
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/Conventions/AbpServiceConvention.cs
@@ -4,8 +4,8 @@ using System.Linq;
using System.Reflection;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Mvc;
+using Microsoft.AspNetCore.Mvc.ActionConstraints;
using Microsoft.AspNetCore.Mvc.ApplicationModels;
-using Microsoft.AspNetCore.Mvc.Internal;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.Extensions.Options;
using Volo.Abp.Application.Services;
diff --git a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/DependencyInjection/AbpAspNetCoreMvcConventionalDependencyRegistrar.cs b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/DependencyInjection/AbpAspNetCoreMvcConventionalDependencyRegistrar.cs
index a4f57b1b1f..526470b3ad 100644
--- a/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/DependencyInjection/AbpAspNetCoreMvcConventionalDependencyRegistrar.cs
+++ b/framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/DependencyInjection/AbpAspNetCoreMvcConventionalDependencyRegistrar.cs
@@ -7,10 +7,15 @@ using Volo.Abp.DependencyInjection;
namespace Volo.Abp.AspNetCore.Mvc.DependencyInjection
{
- public class AbpAspNetCoreMvcConventionalRegistrar : DefaultConventionalRegistrar
+ public class AbpAspNetCoreMvcConventionalRegistrar : ConventionalRegistrarBase
{
public override void AddType(IServiceCollection services, Type type)
{
+ if (IsConventionalRegistrationDisabled(type))
+ {
+ return;
+ }
+
if (!IsMvcService(type))
{
return;
diff --git a/framework/src/Volo.Abp.AspNetCore.TestBase/Properties/launchSettings.json b/framework/src/Volo.Abp.AspNetCore.TestBase/Properties/launchSettings.json
new file mode 100644
index 0000000000..fca5708e7b
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore.TestBase/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:53783/",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "Volo.Abp.AspNetCore.TestBase": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "http://localhost:53784/"
+ }
+ }
+}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj b/framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj
index 291a36d6b6..e08579cdb7 100644
--- a/framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj
+++ b/framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj
@@ -1,15 +1,17 @@
-
+
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.AspNetCore.TestBase
Volo.Abp.AspNetCore.TestBase
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
false
false
false
+ true
+ Library
@@ -20,7 +22,7 @@
-
+
diff --git a/framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/DynamicProxying/AspNetCoreTestDynamicProxyHttpClientFactory.cs b/framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/DynamicProxying/AspNetCoreTestDynamicProxyHttpClientFactory.cs
index e8463e16cc..71de80b018 100644
--- a/framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/DynamicProxying/AspNetCoreTestDynamicProxyHttpClientFactory.cs
+++ b/framework/src/Volo.Abp.AspNetCore.TestBase/Volo/Abp/AspNetCore/TestBase/DynamicProxying/AspNetCoreTestDynamicProxyHttpClientFactory.cs
@@ -8,11 +8,11 @@ namespace Volo.Abp.AspNetCore.TestBase.DynamicProxying
public class AspNetCoreTestDynamicProxyHttpClientFactory : IDynamicProxyHttpClientFactory, ITransientDependency
{
private readonly ITestServerAccessor _testServerAccessor;
- private readonly IHttpClientFactory _httpClientFactory;
- public AspNetCoreTestDynamicProxyHttpClientFactory(ITestServerAccessor testServerAccessor, IHttpClientFactory httpClientFactory) {
+ public AspNetCoreTestDynamicProxyHttpClientFactory(
+ ITestServerAccessor testServerAccessor)
+ {
_testServerAccessor = testServerAccessor;
- _httpClientFactory = httpClientFactory;
}
public HttpClient Create()
@@ -20,7 +20,8 @@ namespace Volo.Abp.AspNetCore.TestBase.DynamicProxying
return _testServerAccessor.Server.CreateClient();
}
- public HttpClient Create(string name) {
+ public HttpClient Create(string name)
+ {
return Create();
}
}
diff --git a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs
index ffb4a9d5cc..e2c930f39c 100644
--- a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs
+++ b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Builder/AbpApplicationBuilderExtensions.cs
@@ -1,9 +1,5 @@
using System;
-using System.Collections.Generic;
-using System.Globalization;
-using System.Linq;
using JetBrains.Annotations;
-using Microsoft.AspNetCore.Localization;
using Microsoft.AspNetCore.RequestLocalization;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp;
@@ -12,9 +8,6 @@ using Volo.Abp.AspNetCore.Mvc.ExceptionHandling;
using Volo.Abp.AspNetCore.Tracing;
using Volo.Abp.AspNetCore.Uow;
using Volo.Abp.DependencyInjection;
-using Volo.Abp.Localization;
-using Volo.Abp.Settings;
-using Volo.Abp.Threading;
namespace Microsoft.AspNetCore.Builder
{
@@ -51,7 +44,10 @@ namespace Microsoft.AspNetCore.Builder
public static IApplicationBuilder UseAbpRequestLocalization(this IApplicationBuilder app, Action optionsAction = null)
{
- app.ApplicationServices.GetRequiredService().InitLocalizationOptions(optionsAction);
+ app.ApplicationServices
+ .GetRequiredService()
+ .InitLocalizationOptions(optionsAction);
+
return app.UseMiddleware();
}
diff --git a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Hosting/AbpHostingEnvironmentExtensions.cs b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Hosting/AbpHostingEnvironmentExtensions.cs
index 7e8bd32055..039e819b38 100644
--- a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Hosting/AbpHostingEnvironmentExtensions.cs
+++ b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/Hosting/AbpHostingEnvironmentExtensions.cs
@@ -6,7 +6,7 @@ namespace Microsoft.AspNetCore.Hosting
public static class AbpHostingEnvironmentExtensions
{
public static IConfigurationRoot BuildConfiguration(
- this IHostingEnvironment env,
+ this IWebHostEnvironment env,
ConfigurationBuilderOptions options = null)
{
options = options ?? new ConfigurationBuilderOptions();
diff --git a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/AbpRequestLocalizationMiddleware.cs b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/AbpRequestLocalizationMiddleware.cs
index 21fa6d96f3..75d903557e 100644
--- a/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/AbpRequestLocalizationMiddleware.cs
+++ b/framework/src/Volo.Abp.AspNetCore/Microsoft/AspNetCore/RequestLocalization/AbpRequestLocalizationMiddleware.cs
@@ -1,6 +1,8 @@
using System.Threading.Tasks;
+using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Localization;
+using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Volo.Abp.DependencyInjection;
@@ -9,17 +11,24 @@ namespace Microsoft.AspNetCore.RequestLocalization
public class AbpRequestLocalizationMiddleware : IMiddleware, ITransientDependency
{
private readonly IAbpRequestLocalizationOptionsProvider _requestLocalizationOptionsProvider;
+ private readonly ILoggerFactory _loggerFactory;
public AbpRequestLocalizationMiddleware(
- IAbpRequestLocalizationOptionsProvider requestLocalizationOptionsProvider)
+ IAbpRequestLocalizationOptionsProvider requestLocalizationOptionsProvider,
+ ILoggerFactory loggerFactory)
{
_requestLocalizationOptionsProvider = requestLocalizationOptionsProvider;
+ _loggerFactory = loggerFactory;
}
public async Task InvokeAsync(HttpContext context, RequestDelegate next)
{
- var options = Options.Create(_requestLocalizationOptionsProvider.GetLocalizationOptions());
- var middleware = new RequestLocalizationMiddleware(next, options);
+ var middleware = new RequestLocalizationMiddleware(
+ next,
+ new OptionsWrapper(_requestLocalizationOptionsProvider.GetLocalizationOptions()),
+ _loggerFactory
+ );
+
await middleware.Invoke(context);
}
}
diff --git a/framework/src/Volo.Abp.AspNetCore/Microsoft/Extensions/DependencyInjection/AbpAspNetCoreServiceCollectionExtensions.cs b/framework/src/Volo.Abp.AspNetCore/Microsoft/Extensions/DependencyInjection/AbpAspNetCoreServiceCollectionExtensions.cs
index 859bdcdbaf..cf11ab32c3 100644
--- a/framework/src/Volo.Abp.AspNetCore/Microsoft/Extensions/DependencyInjection/AbpAspNetCoreServiceCollectionExtensions.cs
+++ b/framework/src/Volo.Abp.AspNetCore/Microsoft/Extensions/DependencyInjection/AbpAspNetCoreServiceCollectionExtensions.cs
@@ -5,9 +5,9 @@ namespace Microsoft.Extensions.DependencyInjection
{
public static class AbpAspNetCoreServiceCollectionExtensions
{
- public static IHostingEnvironment GetHostingEnvironment(this IServiceCollection services)
+ public static IWebHostEnvironment GetHostingEnvironment(this IServiceCollection services)
{
- return services.GetSingletonInstance();
+ return services.GetSingletonInstance();
}
public static IConfigurationRoot BuildConfiguration(this IServiceCollection services, ConfigurationBuilderOptions options = null)
diff --git a/framework/src/Volo.Abp.AspNetCore/Properties/launchSettings.json b/framework/src/Volo.Abp.AspNetCore/Properties/launchSettings.json
new file mode 100644
index 0000000000..4098e788cd
--- /dev/null
+++ b/framework/src/Volo.Abp.AspNetCore/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:53374/",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "Volo.Abp.AspNetCore": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "http://localhost:53375/"
+ }
+ }
+}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.AspNetCore/Volo.Abp.AspNetCore.csproj b/framework/src/Volo.Abp.AspNetCore/Volo.Abp.AspNetCore.csproj
index 2584654ce8..d6a67c14be 100644
--- a/framework/src/Volo.Abp.AspNetCore/Volo.Abp.AspNetCore.csproj
+++ b/framework/src/Volo.Abp.AspNetCore/Volo.Abp.AspNetCore.csproj
@@ -1,15 +1,17 @@
-
+
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.AspNetCore
Volo.Abp.AspNetCore
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
false
false
false
+ true
+ Library
@@ -26,13 +28,4 @@
-
-
-
-
-
-
-
-
-
diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/ApplicationInitializationContextExtensions.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/ApplicationInitializationContextExtensions.cs
index ed41314209..616afc8427 100644
--- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/ApplicationInitializationContextExtensions.cs
+++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/ApplicationInitializationContextExtensions.cs
@@ -13,9 +13,9 @@ namespace Volo.Abp
return context.ServiceProvider.GetRequiredService>().Value;
}
- public static IHostingEnvironment GetEnvironment(this ApplicationInitializationContext context)
+ public static IWebHostEnvironment GetEnvironment(this ApplicationInitializationContext context)
{
- return context.ServiceProvider.GetRequiredService();
+ return context.ServiceProvider.GetRequiredService();
}
public static ILoggerFactory GetLoggerFactory(this ApplicationInitializationContext context)
diff --git a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/WebContentFileProvider.cs b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/WebContentFileProvider.cs
index b837007996..ebc7446d68 100644
--- a/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/WebContentFileProvider.cs
+++ b/framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/WebContentFileProvider.cs
@@ -14,14 +14,14 @@ namespace Volo.Abp.AspNetCore.VirtualFileSystem
{
private readonly IVirtualFileProvider _virtualFileProvider;
private readonly IFileProvider _fileProvider;
- private readonly IHostingEnvironment _hostingEnvironment;
+ private readonly IWebHostEnvironment _hostingEnvironment;
private string _rootPath = "/wwwroot"; //TODO: How to handle wwwroot naming?
protected AspNetCoreContentOptions Options { get; }
public WebContentFileProvider(
- IVirtualFileProvider virtualFileProvider,
- IHostingEnvironment hostingEnvironment,
+ IVirtualFileProvider virtualFileProvider,
+ IWebHostEnvironment hostingEnvironment,
IOptions options)
{
_virtualFileProvider = virtualFileProvider;
diff --git a/framework/src/Volo.Abp.Authorization/Volo.Abp.Authorization.csproj b/framework/src/Volo.Abp.Authorization/Volo.Abp.Authorization.csproj
index 1be1b27c4f..511e8879a7 100644
--- a/framework/src/Volo.Abp.Authorization/Volo.Abp.Authorization.csproj
+++ b/framework/src/Volo.Abp.Authorization/Volo.Abp.Authorization.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationModule.cs b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationModule.cs
index 060fe03dc4..5a9c3fa4db 100644
--- a/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationModule.cs
+++ b/framework/src/Volo.Abp.Authorization/Volo/Abp/Authorization/AbpAuthorizationModule.cs
@@ -25,7 +25,7 @@ namespace Volo.Abp.Authorization
public override void ConfigureServices(ServiceConfigurationContext context)
{
- context.Services.AddAuthorization();
+ context.Services.AddAuthorizationCore();
context.Services.AddSingleton();
diff --git a/framework/src/Volo.Abp.Caching/Volo.Abp.Caching.csproj b/framework/src/Volo.Abp.Caching/Volo.Abp.Caching.csproj
index f4417ae910..445b6c98af 100644
--- a/framework/src/Volo.Abp.Caching/Volo.Abp.Caching.csproj
+++ b/framework/src/Volo.Abp.Caching/Volo.Abp.Caching.csproj
@@ -1,4 +1,4 @@
-
+
@@ -14,7 +14,7 @@
-
+
diff --git a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/UpdateNuGetConfigStep.cs b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/UpdateNuGetConfigStep.cs
index 428aaa6c96..1a40eff341 100644
--- a/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/UpdateNuGetConfigStep.cs
+++ b/framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/UpdateNuGetConfigStep.cs
@@ -29,7 +29,10 @@ namespace Volo.Abp.Cli.ProjectBuilding.Templates.App
return;
}
- file.ReplaceText("{api-key}", apiKey);
+ const string placeHolder = "";
+ var nugetSourceTag = $"";
+
+ file.ReplaceText(placeHolder, nugetSourceTag);
}
}
}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj b/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj
index f28c2554b2..01d1a210ef 100644
--- a/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj
+++ b/framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj
@@ -4,7 +4,7 @@
Exe
- netcoreapp2.2
+ netcoreapp3.0
true
abp
diff --git a/framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/ConfigurationBuilderOptions.cs b/framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/ConfigurationBuilderOptions.cs
index 101dad5c95..aa55c0e876 100644
--- a/framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/ConfigurationBuilderOptions.cs
+++ b/framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/ConfigurationBuilderOptions.cs
@@ -30,5 +30,10 @@ namespace Microsoft.Extensions.Configuration
/// Base path to read the configuration file indicated by .
///
public string BasePath { get; set; }
+
+ ///
+ /// Prefix for the environment variables.
+ ///
+ public string EnvironmentVariablesPrefix { get; set; }
}
}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/ConfigurationHelper.cs b/framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/ConfigurationHelper.cs
index b2d005685e..37e721f1af 100644
--- a/framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/ConfigurationHelper.cs
+++ b/framework/src/Volo.Abp.Core/Microsoft/Extensions/Configuration/ConfigurationHelper.cs
@@ -23,7 +23,7 @@ namespace Microsoft.Extensions.Configuration
builder = builder.AddJsonFile($"{options.FileName}.{options.EnvironmentName}.json", optional: true, reloadOnChange: true);
}
- builder = builder.AddEnvironmentVariables();
+ builder = builder.AddEnvironmentVariables(options.EnvironmentVariablesPrefix);
if (options.EnvironmentName == "Development")
{
diff --git a/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj b/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj
index a7a2a4a55a..b64f3f47e1 100644
--- a/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj
+++ b/framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj
@@ -11,18 +11,18 @@
-
-
+
+
+
+
+
+
+
+
+
-
+
-
-
-
-
-
-
-
diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ConventionalRegistrarBase.cs b/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ConventionalRegistrarBase.cs
index f9cbf3c13c..8a47e7fa17 100644
--- a/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ConventionalRegistrarBase.cs
+++ b/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/ConventionalRegistrarBase.cs
@@ -1,4 +1,5 @@
using System;
+using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Microsoft.Extensions.DependencyInjection;
@@ -31,5 +32,23 @@ namespace Volo.Abp.DependencyInjection
}
public abstract void AddType(IServiceCollection services, Type type);
+
+ protected virtual bool IsConventionalRegistrationDisabled(Type type)
+ {
+ return type.IsDefined(typeof(DisableConventionalRegistrationAttribute), true);
+ }
+
+ protected virtual void TriggerServiceExposing(IServiceCollection services, Type implementationType, List serviceTypes)
+ {
+ var exposeActions = services.GetExposingActionList();
+ if (exposeActions.Any())
+ {
+ var args = new OnServiceExposingContext(implementationType, serviceTypes);
+ foreach (var action in exposeActions)
+ {
+ action(args);
+ }
+ }
+ }
}
}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/DefaultConventionalRegistrar.cs b/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/DefaultConventionalRegistrar.cs
index 9c5ee06d81..15361ece62 100644
--- a/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/DefaultConventionalRegistrar.cs
+++ b/framework/src/Volo.Abp.Core/Volo/Abp/DependencyInjection/DefaultConventionalRegistrar.cs
@@ -1,6 +1,4 @@
using System;
-using System.Collections.Generic;
-using System.Linq;
using System.Reflection;
using JetBrains.Annotations;
using Microsoft.Extensions.DependencyInjection;
@@ -48,25 +46,7 @@ namespace Volo.Abp.DependencyInjection
}
}
}
-
- protected virtual void TriggerServiceExposing(IServiceCollection services, Type type, List serviceTypes)
- {
- var exposeActions = services.GetExposingActionList();
- if (exposeActions.Any())
- {
- var args = new OnServiceExposingContext(type, serviceTypes);
- foreach (var action in exposeActions)
- {
- action(args);
- }
- }
- }
-
- protected virtual bool IsConventionalRegistrationDisabled(Type type)
- {
- return type.IsDefined(typeof(DisableConventionalRegistrationAttribute), true);
- }
-
+
protected virtual DependencyAttribute GetDependencyAttributeOrNull(Type type)
{
return type.GetCustomAttribute(true);
diff --git a/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/IAbpModule.cs b/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/IAbpModule.cs
index 32c8980c54..45f02e08c8 100644
--- a/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/IAbpModule.cs
+++ b/framework/src/Volo.Abp.Core/Volo/Abp/Modularity/IAbpModule.cs
@@ -2,7 +2,7 @@
namespace Volo.Abp.Modularity
{
- public interface IAbpModule : ISingletonDependency
+ public interface IAbpModule
{
void ConfigureServices(ServiceConfigurationContext context);
}
diff --git a/framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj b/framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj
index 849dc33c60..0b9ba3f9a9 100644
--- a/framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj
+++ b/framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netstandard2.1
Volo.Abp.Dapper
Volo.Abp.Dapper
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
diff --git a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs
index 3a64760a0f..c8e89f6869 100644
--- a/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs
+++ b/framework/src/Volo.Abp.Ddd.Application/Volo/Abp/Application/Services/CrudAppService.cs
@@ -289,7 +289,11 @@ namespace Volo.Abp.Application.Services
return;
}
- entityWithGuidId.Id = GuidGenerator.Create();
+ EntityHelper.TrySetId(
+ entityWithGuidId,
+ () => GuidGenerator.Create(),
+ true
+ );
}
///
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/AuditedAggregateRoot.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/AuditedAggregateRoot.cs
index 8f566f1b6b..bc4830bc03 100644
--- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/AuditedAggregateRoot.cs
+++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/AuditedAggregateRoot.cs
@@ -28,5 +28,16 @@ namespace Volo.Abp.Domain.Entities.Auditing
///
public virtual Guid? LastModifierId { get; set; }
+
+ protected AuditedAggregateRoot()
+ {
+
+ }
+
+ protected AuditedAggregateRoot(TKey id)
+ : base(id)
+ {
+
+ }
}
}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/AuditedAggregateRootWithUser.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/AuditedAggregateRootWithUser.cs
index 107fb35b68..ec490fbb50 100644
--- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/AuditedAggregateRootWithUser.cs
+++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/AuditedAggregateRootWithUser.cs
@@ -32,5 +32,16 @@ namespace Volo.Abp.Domain.Entities.Auditing
///
public virtual TUser LastModifier { get; set; }
+
+ protected AuditedAggregateRootWithUser()
+ {
+
+ }
+
+ protected AuditedAggregateRootWithUser(TKey id)
+ : base(id)
+ {
+
+ }
}
}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/AuditedEntity.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/AuditedEntity.cs
index 2ccc1aa1e2..0423551509 100644
--- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/AuditedEntity.cs
+++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/AuditedEntity.cs
@@ -28,5 +28,16 @@ namespace Volo.Abp.Domain.Entities.Auditing
///
public virtual Guid? LastModifierId { get; set; }
+
+ protected AuditedEntity()
+ {
+
+ }
+
+ protected AuditedEntity(TKey id)
+ : base(id)
+ {
+
+ }
}
}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/AuditedEntityWithUser.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/AuditedEntityWithUser.cs
index 76002b2114..fd6aeb9dd9 100644
--- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/AuditedEntityWithUser.cs
+++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/AuditedEntityWithUser.cs
@@ -32,5 +32,16 @@ namespace Volo.Abp.Domain.Entities.Auditing
///
public virtual TUser LastModifier { get; set; }
+
+ protected AuditedEntityWithUser()
+ {
+
+ }
+
+ protected AuditedEntityWithUser(TKey id)
+ : base(id)
+ {
+
+ }
}
}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/CreationAuditedAggregateRoot.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/CreationAuditedAggregateRoot.cs
index 29c01bd466..084c907606 100644
--- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/CreationAuditedAggregateRoot.cs
+++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/CreationAuditedAggregateRoot.cs
@@ -28,5 +28,16 @@ namespace Volo.Abp.Domain.Entities.Auditing
///
public virtual Guid? CreatorId { get; set; }
+
+ protected CreationAuditedAggregateRoot()
+ {
+
+ }
+
+ protected CreationAuditedAggregateRoot(TKey id)
+ : base(id)
+ {
+
+ }
}
}
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/CreationAuditedAggregateRootWithUser.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/CreationAuditedAggregateRootWithUser.cs
index 1084360749..7d491d7be1 100644
--- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/CreationAuditedAggregateRootWithUser.cs
+++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/CreationAuditedAggregateRootWithUser.cs
@@ -24,5 +24,16 @@ namespace Volo.Abp.Domain.Entities.Auditing
{
///
public virtual TUser Creator { get; set; }
+
+ protected CreationAuditedAggregateRootWithUser()
+ {
+
+ }
+
+ protected CreationAuditedAggregateRootWithUser(TKey id)
+ : base(id)
+ {
+
+ }
}
}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/CreationAuditedEntity.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/CreationAuditedEntity.cs
index 1ab527dc2a..41802c78b7 100644
--- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/CreationAuditedEntity.cs
+++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/CreationAuditedEntity.cs
@@ -28,5 +28,16 @@ namespace Volo.Abp.Domain.Entities.Auditing
///
public virtual Guid? CreatorId { get; set; }
+
+ protected CreationAuditedEntity()
+ {
+
+ }
+
+ protected CreationAuditedEntity(TKey id)
+ : base(id)
+ {
+
+ }
}
}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/CreationAuditedEntityWithUser.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/CreationAuditedEntityWithUser.cs
index 0989dfeac4..45d844efa7 100644
--- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/CreationAuditedEntityWithUser.cs
+++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/CreationAuditedEntityWithUser.cs
@@ -24,5 +24,16 @@ namespace Volo.Abp.Domain.Entities.Auditing
{
///
public virtual TUser Creator { get; set; }
+
+ protected CreationAuditedEntityWithUser()
+ {
+
+ }
+
+ protected CreationAuditedEntityWithUser(TKey id)
+ : base(id)
+ {
+
+ }
}
}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/FullAuditedAggregateRoot.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/FullAuditedAggregateRoot.cs
index 397a425629..9231efd3ab 100644
--- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/FullAuditedAggregateRoot.cs
+++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/FullAuditedAggregateRoot.cs
@@ -34,5 +34,16 @@ namespace Volo.Abp.Domain.Entities.Auditing
///
public virtual DateTime? DeletionTime { get; set; }
+
+ protected FullAuditedAggregateRoot()
+ {
+
+ }
+
+ protected FullAuditedAggregateRoot(TKey id)
+ : base(id)
+ {
+
+ }
}
}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/FullAuditedAggregateRootWithUser.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/FullAuditedAggregateRootWithUser.cs
index d379a78240..cb0be46421 100644
--- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/FullAuditedAggregateRootWithUser.cs
+++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/FullAuditedAggregateRootWithUser.cs
@@ -38,5 +38,16 @@ namespace Volo.Abp.Domain.Entities.Auditing
///
public TUser LastModifier { get; set; }
+
+ protected FullAuditedAggregateRootWithUser()
+ {
+
+ }
+
+ protected FullAuditedAggregateRootWithUser(TKey id)
+ : base(id)
+ {
+
+ }
}
}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/FullAuditedEntity.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/FullAuditedEntity.cs
index 20b07b85b5..ada5cc9eed 100644
--- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/FullAuditedEntity.cs
+++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/FullAuditedEntity.cs
@@ -34,5 +34,16 @@ namespace Volo.Abp.Domain.Entities.Auditing
///
public virtual DateTime? DeletionTime { get; set; }
+
+ protected FullAuditedEntity()
+ {
+
+ }
+
+ protected FullAuditedEntity(TKey id)
+ : base(id)
+ {
+
+ }
}
}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/FullAuditedEntityWithUser.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/FullAuditedEntityWithUser.cs
index 9aba520480..12458ebf99 100644
--- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/FullAuditedEntityWithUser.cs
+++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Auditing/FullAuditedEntityWithUser.cs
@@ -38,5 +38,16 @@ namespace Volo.Abp.Domain.Entities.Auditing
///
public TUser LastModifier { get; set; }
+
+ protected FullAuditedEntityWithUser()
+ {
+
+ }
+
+ protected FullAuditedEntityWithUser(TKey id)
+ : base(id)
+ {
+
+ }
}
}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/DisableIdGenerationAttribute.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/DisableIdGenerationAttribute.cs
new file mode 100644
index 0000000000..1d823ca177
--- /dev/null
+++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/DisableIdGenerationAttribute.cs
@@ -0,0 +1,9 @@
+using System;
+
+namespace Volo.Abp.Domain.Entities
+{
+ public class DisableIdGenerationAttribute : Attribute
+ {
+
+ }
+}
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Entity.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Entity.cs
index c96e305d45..b78a5aa400 100644
--- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Entity.cs
+++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/Entity.cs
@@ -23,7 +23,7 @@ namespace Volo.Abp.Domain.Entities
public abstract class Entity : Entity, IEntity
{
///
- public virtual TKey Id { get; set; }
+ public virtual TKey Id { get; protected set; }
protected Entity()
{
@@ -35,8 +35,7 @@ namespace Volo.Abp.Domain.Entities
Id = id;
}
- ///
- public override bool Equals(object obj)
+ public bool EntityEquals(object obj)
{
if (obj == null || !(obj is Entity))
{
@@ -73,33 +72,7 @@ namespace Volo.Abp.Domain.Entities
return Id.Equals(other.Id);
}
-
- ///
- public override int GetHashCode()
- {
- if (Id == null)
- {
- return 0;
- }
-
- return Id.GetHashCode();
- }
-
- public static bool operator ==(Entity left, Entity right)
- {
- if (Equals(left, null))
- {
- return Equals(right, null);
- }
-
- return left.Equals(right);
- }
-
- public static bool operator !=(Entity left, Entity right)
- {
- return !(left == right);
- }
-
+
public override object[] GetKeys()
{
return new object[] {Id};
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/EntityHelper.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/EntityHelper.cs
index b6558f34d1..dd483f5d7b 100644
--- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/EntityHelper.cs
+++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/EntityHelper.cs
@@ -81,5 +81,32 @@ namespace Volo.Abp.Domain.Entities
var lambdaBody = Expression.Equal(leftExpression, rightExpression);
return Expression.Lambda>(lambdaBody, lambdaParam);
}
+
+ public static void TrySetId(
+ IEntity entity,
+ Func idFactory,
+ bool checkForDisableGuidGenerationAttribute = false)
+ {
+ //TODO: Can be optimized (by caching per entity type)?
+ var entityType = entity.GetType();
+ var idProperty = entityType.GetProperty(
+ nameof(entity.Id)
+ );
+
+ if (idProperty == null)
+ {
+ return;
+ }
+
+ if (checkForDisableGuidGenerationAttribute)
+ {
+ if (idProperty.IsDefined(typeof(DisableIdGenerationAttribute), true))
+ {
+ return;
+ }
+ }
+
+ idProperty.SetValue(entity, idFactory());
+ }
}
}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/IEntity.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/IEntity.cs
index 58e607b120..890c5227bd 100644
--- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/IEntity.cs
+++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Entities/IEntity.cs
@@ -22,6 +22,6 @@
///
/// Unique identifier for this entity.
///
- TKey Id { get; set; }
+ TKey Id { get; }
}
}
diff --git a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Values/ValueObject.cs b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Values/ValueObject.cs
index ea84b41792..00a4c7ddd3 100644
--- a/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Values/ValueObject.cs
+++ b/framework/src/Volo.Abp.Ddd.Domain/Volo/Abp/Domain/Values/ValueObject.cs
@@ -7,23 +7,9 @@ namespace Volo.Abp.Domain.Values
public abstract class ValueObject
{
- protected static bool EqualOperator(ValueObject left, ValueObject right)
- {
- if (ReferenceEquals(left, null) ^ ReferenceEquals(right, null))
- {
- return false;
- }
- return ReferenceEquals(left, null) || left.Equals(right);
- }
-
- protected static bool NotEqualOperator(ValueObject left, ValueObject right)
- {
- return !(EqualOperator(left, right));
- }
-
protected abstract IEnumerable
-
+
diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj
index 458ffda849..db425e4941 100644
--- a/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj
+++ b/framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netstandard2.1
Volo.Abp.EntityFrameworkCore.SqlServer
Volo.Abp.EntityFrameworkCore.SqlServer
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
@@ -18,7 +18,7 @@
-
+
diff --git a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj
index b22bc48301..35d7cc2f40 100644
--- a/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj
+++ b/framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netstandard2.1
Volo.Abp.EntityFrameworkCore.Sqlite
Volo.Abp.EntityFrameworkCore.Sqlite
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
@@ -14,7 +14,7 @@
-
+
diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj b/framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj
index a472c09690..43b1182d58 100644
--- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj
+++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netstandard2.1
Volo.Abp.EntityFrameworkCore
Volo.Abp.EntityFrameworkCore
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
@@ -19,8 +19,8 @@
-
-
+
+
diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs
index 23b4e36b75..e26624747c 100644
--- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs
+++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/Domain/Repositories/EntityFrameworkCore/EfCoreRepository.cs
@@ -258,14 +258,14 @@ namespace Volo.Abp.Domain.Repositories.EntityFrameworkCore
public virtual TEntity Find(TKey id, bool includeDetails = true)
{
return includeDetails
- ? WithDetails().FirstOrDefault(EntityHelper.CreateEqualityExpressionForId(id))
+ ? WithDetails().FirstOrDefault(e => e.Id.Equals(id))
: DbSet.Find(id);
}
public virtual async Task FindAsync(TKey id, bool includeDetails = true, CancellationToken cancellationToken = default)
{
return includeDetails
- ? await WithDetails().FirstOrDefaultAsync(EntityHelper.CreateEqualityExpressionForId(id), GetCancellationToken(cancellationToken))
+ ? await WithDetails().FirstOrDefaultAsync(e => e.Id.Equals(id), GetCancellationToken(cancellationToken))
: await DbSet.FindAsync(new object[] { id }, GetCancellationToken(cancellationToken));
}
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 1ed5f3eaed..3604913301 100644
--- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs
+++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/AbpDbContext.cs
@@ -9,7 +9,6 @@ using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking;
using Microsoft.EntityFrameworkCore.Metadata;
-using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Newtonsoft.Json;
@@ -282,20 +281,37 @@ namespace Volo.Abp.EntityFrameworkCore
protected virtual void CheckAndSetId(EntityEntry entry)
{
- //Set GUID Ids
- var entity = entry.Entity as IEntity;
- if (entity != null && entity.Id == Guid.Empty)
+ if (entry.Entity is IEntity entityWithGuidId)
{
- var dbGeneratedAttr = ReflectionHelper
- .GetSingleAttributeOrDefault(
- entry.Property("Id").Metadata.PropertyInfo
- );
+ TrySetGuidId(entry, entityWithGuidId);
+ }
+ }
- if (dbGeneratedAttr == null || dbGeneratedAttr.DatabaseGeneratedOption == DatabaseGeneratedOption.None)
- {
- entity.Id = GuidGenerator.Create();
- }
+ protected virtual void TrySetGuidId(EntityEntry entry, IEntity entity)
+ {
+ if (entity.Id != default)
+ {
+ return;
}
+
+ var idProperty = entry.Property("Id").Metadata.PropertyInfo;
+
+ //Check for DatabaseGeneratedAttribute
+ var dbGeneratedAttr = ReflectionHelper
+ .GetSingleAttributeOrDefault(
+ idProperty
+ );
+
+ if (dbGeneratedAttr != null && dbGeneratedAttr.DatabaseGeneratedOption != DatabaseGeneratedOption.None)
+ {
+ return;
+ }
+
+ EntityHelper.TrySetId(
+ entity,
+ () => GuidGenerator.Create(),
+ true
+ );
}
protected virtual void SetCreationAuditProperties(EntityEntry entry)
@@ -494,12 +510,12 @@ namespace Volo.Abp.EntityFrameworkCore
if (typeof(ISoftDelete).IsAssignableFrom(typeof(TEntity)))
{
- expression = e => !IsSoftDeleteFilterEnabled || !((ISoftDelete) e).IsDeleted;
+ expression = e => !IsSoftDeleteFilterEnabled || !EF.Property(e, "IsDeleted");
}
if (typeof(IMultiTenant).IsAssignableFrom(typeof(TEntity)))
{
- Expression> multiTenantFilter = e => !IsMultiTenantFilterEnabled || ((IMultiTenant) e).TenantId == CurrentTenantId;
+ Expression> multiTenantFilter = e => !IsMultiTenantFilterEnabled || EF.Property(e, "TenantId") == CurrentTenantId;
expression = expression == null ? multiTenantFilter : CombineExpressions(expression, multiTenantFilter);
}
diff --git a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/IEfCoreDbContext.cs b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/IEfCoreDbContext.cs
index 7cba957724..761e15b6f2 100644
--- a/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/IEfCoreDbContext.cs
+++ b/framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/IEfCoreDbContext.cs
@@ -35,9 +35,9 @@ namespace Volo.Abp.EntityFrameworkCore
EntityEntry Add([NotNull] TEntity entity) where TEntity : class;
- Task AddAsync([NotNull] object entity, CancellationToken cancellationToken = default);
+ ValueTask AddAsync([NotNull] object entity, CancellationToken cancellationToken = default);
- Task> AddAsync([NotNull] TEntity entity, CancellationToken cancellationToken = default) where TEntity : class;
+ ValueTask> AddAsync([NotNull] TEntity entity, CancellationToken cancellationToken = default) where TEntity : class;
void AddRange([NotNull] IEnumerable entities);
@@ -59,13 +59,13 @@ namespace Volo.Abp.EntityFrameworkCore
TEntity Find([NotNull] params object[] keyValues) where TEntity : class;
- Task FindAsync([NotNull] Type entityType, [NotNull] object[] keyValues, CancellationToken cancellationToken);
+ ValueTask FindAsync([NotNull] Type entityType, [NotNull] object[] keyValues, CancellationToken cancellationToken);
- Task FindAsync([NotNull] object[] keyValues, CancellationToken cancellationToken) where TEntity : class;
+ ValueTask FindAsync([NotNull] object[] keyValues, CancellationToken cancellationToken) where TEntity : class;
- Task FindAsync([NotNull] params object[] keyValues) where TEntity : class;
+ ValueTask FindAsync([NotNull] params object[] keyValues) where TEntity : class;
- Task FindAsync([NotNull] Type entityType, [NotNull] params object[] keyValues);
+ ValueTask FindAsync([NotNull] Type entityType, [NotNull] params object[] keyValues);
EntityEntry Remove([NotNull] TEntity entity) where TEntity : class;
diff --git a/framework/src/Volo.Abp.FluentValidation/Volo/Abp/FluentValidation/AbpFluentValidationConventionalRegistrar.cs b/framework/src/Volo.Abp.FluentValidation/Volo/Abp/FluentValidation/AbpFluentValidationConventionalRegistrar.cs
index 9641b438b0..d51e4728ca 100644
--- a/framework/src/Volo.Abp.FluentValidation/Volo/Abp/FluentValidation/AbpFluentValidationConventionalRegistrar.cs
+++ b/framework/src/Volo.Abp.FluentValidation/Volo/Abp/FluentValidation/AbpFluentValidationConventionalRegistrar.cs
@@ -1,14 +1,20 @@
using System;
+using System.Collections.Generic;
using FluentValidation;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.FluentValidation
{
- public class AbpFluentValidationConventionalRegistrar : DefaultConventionalRegistrar
+ public class AbpFluentValidationConventionalRegistrar : ConventionalRegistrarBase
{
public override void AddType(IServiceCollection services, Type type)
{
+ if (IsConventionalRegistrationDisabled(type))
+ {
+ return;
+ }
+
if (!typeof(IValidator).IsAssignableFrom(type))
{
return;
@@ -20,8 +26,12 @@ namespace Volo.Abp.FluentValidation
return;
}
+ var serviceType = typeof(IValidator<>).MakeGenericType(validatingType);
+
+ TriggerServiceExposing(services, type, new List{ serviceType });
+
services.AddTransient(
- typeof(IValidator<>).MakeGenericType(validatingType),
+ serviceType,
type
);
}
diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel/Properties/launchSettings.json b/framework/src/Volo.Abp.Http.Client.IdentityModel/Properties/launchSettings.json
new file mode 100644
index 0000000000..d56e5c65b7
--- /dev/null
+++ b/framework/src/Volo.Abp.Http.Client.IdentityModel/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:52306/",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "Volo.Abp.Http.Client.IdentityModel": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "http://localhost:52307/"
+ }
+ }
+}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo.Abp.Http.Client.IdentityModel.csproj b/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo.Abp.Http.Client.IdentityModel.csproj
index c515007b30..de2e24e072 100644
--- a/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo.Abp.Http.Client.IdentityModel.csproj
+++ b/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo.Abp.Http.Client.IdentityModel.csproj
@@ -1,15 +1,17 @@
-
+
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.Http.Client.IdentityModel
Volo.Abp.Http.Client.IdentityModel
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
false
false
false
+ true
+ Library
diff --git a/framework/src/Volo.Abp.Http.Client/Properties/launchSettings.json b/framework/src/Volo.Abp.Http.Client/Properties/launchSettings.json
new file mode 100644
index 0000000000..3cef3cf668
--- /dev/null
+++ b/framework/src/Volo.Abp.Http.Client/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:52208/",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "Volo.Abp.Http.Client": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "http://localhost:52209/"
+ }
+ }
+}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj b/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj
index 1c7f727e18..be89651600 100644
--- a/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj
+++ b/framework/src/Volo.Abp.Http.Client/Volo.Abp.Http.Client.csproj
@@ -1,21 +1,22 @@
-
+
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.Http.Client
Volo.Abp.Http.Client
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
false
false
false
+ true
+ Library
-
-
+
diff --git a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiDescriptionFinder.cs b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiDescriptionFinder.cs
index 882bf94cb0..9b9c8e804c 100644
--- a/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiDescriptionFinder.cs
+++ b/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/DynamicProxying/ApiDescriptionFinder.cs
@@ -92,7 +92,7 @@ namespace Volo.Abp.Http.Client.DynamicProxying
if (!response.IsSuccessStatusCode)
{
- throw new AbpException("Remote service returns error!");
+ throw new AbpException("Remote service returns error! StatusCode = " + response.StatusCode);
}
var content = await response.Content.ReadAsStringAsync();
diff --git a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/VirtualFiles/VirtualFileLocalizationResourceContributorBase.cs b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/VirtualFiles/VirtualFileLocalizationResourceContributorBase.cs
index aa66507cdd..c42036d1cd 100644
--- a/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/VirtualFiles/VirtualFileLocalizationResourceContributorBase.cs
+++ b/framework/src/Volo.Abp.Localization/Volo/Abp/Localization/VirtualFiles/VirtualFileLocalizationResourceContributorBase.cs
@@ -84,7 +84,7 @@ namespace Volo.Abp.Localization.VirtualFiles
var dictionary = CreateDictionaryFromFile(file);
if (dictionaries.ContainsKey(dictionary.CultureName))
{
- throw new AbpException($"{file.PhysicalPath} dictionary has a culture name '{dictionary.CultureName}' which is already defined!");
+ throw new AbpException($"{file.GetVirtualOrPhysicalPathOrNull()} dictionary has a culture name '{dictionary.CultureName}' which is already defined!");
}
dictionaries[dictionary.CultureName] = dictionary;
diff --git a/framework/src/Volo.Abp.MailKit/Volo.Abp.MailKit.csproj b/framework/src/Volo.Abp.MailKit/Volo.Abp.MailKit.csproj
index 8af1220e76..90a5fdafcc 100644
--- a/framework/src/Volo.Abp.MailKit/Volo.Abp.MailKit.csproj
+++ b/framework/src/Volo.Abp.MailKit/Volo.Abp.MailKit.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDbRepository.cs b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDbRepository.cs
index 0f82aa798b..68b9beeb6e 100644
--- a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDbRepository.cs
+++ b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/MemoryDbRepository.cs
@@ -75,18 +75,20 @@ namespace Volo.Abp.Domain.Repositories.MemoryDb
protected virtual void SetIdIfNeeded(TEntity entity)
{
- if (typeof(TKey) == typeof(int) || typeof(TKey) == typeof(long) || typeof(TKey) == typeof(Guid))
+ if (typeof(TKey) == typeof(int) ||
+ typeof(TKey) == typeof(long) ||
+ typeof(TKey) == typeof(Guid))
{
if (EntityHelper.HasDefaultId(entity))
{
- entity.Id = Database.GenerateNextId();
+ EntityHelper.TrySetId(entity, () => Database.GenerateNextId());
}
}
}
public virtual TEntity Find(TKey id, bool includeDetails = true)
{
- return GetQueryable().FirstOrDefault(EntityHelper.CreateEqualityExpressionForId(id));
+ return GetQueryable().FirstOrDefault(e => e.Id.Equals(id));
}
public virtual TEntity Get(TKey id, bool includeDetails = true)
diff --git a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/Utf8JsonMemoryDbSerializer.cs b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/Utf8JsonMemoryDbSerializer.cs
index 9964e6219b..e68b4b6f37 100644
--- a/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/Utf8JsonMemoryDbSerializer.cs
+++ b/framework/src/Volo.Abp.MemoryDb/Volo/Abp/Domain/Repositories/MemoryDb/Utf8JsonMemoryDbSerializer.cs
@@ -1,5 +1,8 @@
using System;
+using System.Reflection;
using System.Text;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Serialization;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Json;
@@ -7,21 +10,43 @@ namespace Volo.Abp.Domain.Repositories.MemoryDb
{
public class Utf8JsonMemoryDbSerializer : IMemoryDbSerializer, ITransientDependency
{
- private readonly IJsonSerializer _jsonSerializer;
+ private static readonly JsonSerializerSettings MemoryDbSerializerSettings;
- public Utf8JsonMemoryDbSerializer(IJsonSerializer jsonSerializer)
+ static Utf8JsonMemoryDbSerializer()
{
- _jsonSerializer = jsonSerializer;
+ MemoryDbSerializerSettings = new JsonSerializerSettings
+ {
+ ContractResolver = new ResolverWithPrivateSetters(),
+ ConstructorHandling = ConstructorHandling.AllowNonPublicDefaultConstructor
+ };
}
byte[] IMemoryDbSerializer.Serialize(object obj)
{
- return Encoding.UTF8.GetBytes(_jsonSerializer.Serialize(obj));
+ var jsonString = JsonConvert.SerializeObject(obj, MemoryDbSerializerSettings);
+ return Encoding.UTF8.GetBytes(jsonString);
}
public object Deserialize(byte[] value, Type type)
{
- return _jsonSerializer.Deserialize(type, Encoding.UTF8.GetString(value));
+ var jsonString = Encoding.UTF8.GetString(value);
+ return JsonConvert.DeserializeObject(jsonString, type, MemoryDbSerializerSettings);
+ }
+
+ public class ResolverWithPrivateSetters : DefaultContractResolver
+ {
+ protected override JsonProperty CreateProperty(MemberInfo member, MemberSerialization memberSerialization)
+ {
+ var prop = base.CreateProperty(member, memberSerialization);
+ if (prop.Writable)
+ {
+ return prop;
+ }
+
+ prop.Writable = member.As()?.GetSetMethod(true) != null;
+
+ return prop;
+ }
}
}
}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.MongoDB/Volo.Abp.MongoDB.csproj b/framework/src/Volo.Abp.MongoDB/Volo.Abp.MongoDB.csproj
index 0610e45bfd..b15ea6378c 100644
--- a/framework/src/Volo.Abp.MongoDB/Volo.Abp.MongoDB.csproj
+++ b/framework/src/Volo.Abp.MongoDB/Volo.Abp.MongoDB.csproj
@@ -14,7 +14,7 @@
-
+
diff --git a/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs b/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs
index cddebd253d..deca912bec 100644
--- a/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs
+++ b/framework/src/Volo.Abp.MongoDB/Volo/Abp/Domain/Repositories/MongoDB/MongoDbRepository.cs
@@ -15,6 +15,7 @@ using Volo.Abp.EventBus.Local;
using Volo.Abp.Guids;
using Volo.Abp.MongoDB;
using Volo.Abp.MultiTenancy;
+using Volo.Abp.Reflection;
using Volo.Abp.Threading;
namespace Volo.Abp.Domain.Repositories.MongoDB
@@ -315,12 +316,26 @@ namespace Volo.Abp.Domain.Repositories.MongoDB
protected virtual void CheckAndSetId(TEntity entity)
{
- if (entity is IEntity entityWithGuidId && entityWithGuidId.Id == default)
+ if (entity is IEntity entityWithGuidId)
{
- entityWithGuidId.Id = GuidGenerator.Create();
+ TrySetGuidId(entityWithGuidId);
}
}
+ protected virtual void TrySetGuidId(IEntity entity)
+ {
+ if (entity.Id != default)
+ {
+ return;
+ }
+
+ EntityHelper.TrySetId(
+ entity,
+ () => GuidGenerator.Create(),
+ true
+ );
+ }
+
protected virtual void SetCreationAuditProperties(TEntity entity)
{
AuditPropertySetter.SetCreationProperties(entity);
diff --git a/framework/src/Volo.Abp.VirtualFileSystem/Microsoft/Extensions/FileProviders/AbpFileInfoExtensions.cs b/framework/src/Volo.Abp.VirtualFileSystem/Microsoft/Extensions/FileProviders/AbpFileInfoExtensions.cs
index 6217e82805..5bc9402655 100644
--- a/framework/src/Volo.Abp.VirtualFileSystem/Microsoft/Extensions/FileProviders/AbpFileInfoExtensions.cs
+++ b/framework/src/Volo.Abp.VirtualFileSystem/Microsoft/Extensions/FileProviders/AbpFileInfoExtensions.cs
@@ -3,6 +3,7 @@ using System.IO;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp;
+using Volo.Abp.VirtualFileSystem.Embedded;
namespace Microsoft.Extensions.FileProviders
{
@@ -57,5 +58,17 @@ namespace Microsoft.Extensions.FileProviders
return await stream.GetAllBytesAsync();
}
}
+
+ public static string GetVirtualOrPhysicalPathOrNull([NotNull] this IFileInfo fileInfo)
+ {
+ Check.NotNull(fileInfo, nameof(fileInfo));
+
+ if (fileInfo is EmbeddedResourceFileInfo embeddedFileInfo)
+ {
+ return embeddedFileInfo.VirtualPath;
+ }
+
+ return fileInfo.PhysicalPath;
+ }
}
}
diff --git a/framework/src/Volo.Abp.VirtualFileSystem/Volo.Abp.VirtualFileSystem.csproj b/framework/src/Volo.Abp.VirtualFileSystem/Volo.Abp.VirtualFileSystem.csproj
index 626f1eebc8..32eb16a710 100644
--- a/framework/src/Volo.Abp.VirtualFileSystem/Volo.Abp.VirtualFileSystem.csproj
+++ b/framework/src/Volo.Abp.VirtualFileSystem/Volo.Abp.VirtualFileSystem.csproj
@@ -14,8 +14,8 @@
-
-
+
+
diff --git a/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/DictionaryBasedFileProvider.cs b/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/DictionaryBasedFileProvider.cs
index 4fc72c07ec..a8ea963f0e 100644
--- a/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/DictionaryBasedFileProvider.cs
+++ b/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/DictionaryBasedFileProvider.cs
@@ -39,12 +39,13 @@ namespace Volo.Abp.VirtualFileSystem
var directoryPath = subpath.EnsureEndsWith('/');
foreach (var fileInfo in Files.Values)
{
- if (!fileInfo.PhysicalPath.StartsWith(directoryPath))
+ var fullPath = fileInfo.GetVirtualOrPhysicalPathOrNull();
+ if (!fullPath.StartsWith(directoryPath))
{
continue;
}
- var relativePath = fileInfo.PhysicalPath.Substring(directoryPath.Length);
+ var relativePath = fullPath.Substring(directoryPath.Length);
if (relativePath.Contains("/"))
{
continue;
diff --git a/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/DynamicFileProvider.cs b/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/DynamicFileProvider.cs
index a270616e3a..0a92f62f0a 100644
--- a/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/DynamicFileProvider.cs
+++ b/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/DynamicFileProvider.cs
@@ -31,8 +31,9 @@ namespace Volo.Abp.VirtualFileSystem
public void AddOrUpdate(IFileInfo fileInfo)
{
- DynamicFiles.AddOrUpdate(fileInfo.PhysicalPath, fileInfo, (key, value) => fileInfo);
- ReportChange(fileInfo.PhysicalPath);
+ var filePath = fileInfo.GetVirtualOrPhysicalPathOrNull();
+ DynamicFiles.AddOrUpdate(filePath, fileInfo, (key, value) => fileInfo);
+ ReportChange(filePath);
}
public bool Delete(string filePath)
diff --git a/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/Embedded/EmbeddedResourceFileInfo.cs b/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/Embedded/EmbeddedResourceFileInfo.cs
index 22df03f2ab..7291f93cf8 100644
--- a/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/Embedded/EmbeddedResourceFileInfo.cs
+++ b/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/Embedded/EmbeddedResourceFileInfo.cs
@@ -29,7 +29,9 @@ namespace Volo.Abp.VirtualFileSystem.Embedded
}
private long? _length;
- public string PhysicalPath { get; }
+ public string PhysicalPath => null;
+
+ public string VirtualPath { get; }
public string Name { get; }
@@ -46,14 +48,14 @@ namespace Volo.Abp.VirtualFileSystem.Embedded
public EmbeddedResourceFileInfo(
Assembly assembly,
string resourcePath,
- string physicalPath,
+ string virtualPath,
string name,
DateTimeOffset lastModified)
{
_assembly = assembly;
_resourcePath = resourcePath;
- PhysicalPath = physicalPath;
+ VirtualPath = virtualPath;
Name = name;
LastModified = lastModified;
}
@@ -63,7 +65,7 @@ namespace Volo.Abp.VirtualFileSystem.Embedded
{
var stream = _assembly.GetManifestResourceStream(_resourcePath);
- if (!_length.HasValue)
+ if (!_length.HasValue && stream != null)
{
_length = stream.Length;
}
@@ -73,7 +75,7 @@ namespace Volo.Abp.VirtualFileSystem.Embedded
public override string ToString()
{
- return $"[EmbeddedResourceFileInfo] {Name} ({PhysicalPath})";
+ return $"[EmbeddedResourceFileInfo] {Name} ({this.VirtualPath})";
}
}
}
\ No newline at end of file
diff --git a/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/VirtualFileProvider.cs b/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/VirtualFileProvider.cs
index 9bcf76e4be..be08fc2024 100644
--- a/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/VirtualFileProvider.cs
+++ b/framework/src/Volo.Abp.VirtualFileSystem/Volo/Abp/VirtualFileSystem/VirtualFileProvider.cs
@@ -71,7 +71,7 @@ namespace Volo.Abp.VirtualFileSystem
true
);
}
-
+
private Dictionary CreateFiles()
{
var files = new Dictionary(StringComparer.OrdinalIgnoreCase);
diff --git a/framework/test/AbpTestBase/AbpTestBase.csproj b/framework/test/AbpTestBase/AbpTestBase.csproj
index d794eaa279..c6d5b71672 100644
--- a/framework/test/AbpTestBase/AbpTestBase.csproj
+++ b/framework/test/AbpTestBase/AbpTestBase.csproj
@@ -1,12 +1,11 @@
+
+
- netcoreapp2.2
+ netcoreapp3.0
AbpTestBase
AbpTestBase
- false
- false
- false
diff --git a/framework/test/SimpleConsoleDemo/SimpleConsoleDemo.csproj b/framework/test/SimpleConsoleDemo/SimpleConsoleDemo.csproj
index 0419ae171d..371e2374f9 100644
--- a/framework/test/SimpleConsoleDemo/SimpleConsoleDemo.csproj
+++ b/framework/test/SimpleConsoleDemo/SimpleConsoleDemo.csproj
@@ -2,7 +2,7 @@
Exe
- netcoreapp2.2
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj
index c4933829eb..d1eadf276d 100644
--- a/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj
+++ b/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo.Abp.AspNetCore.Authentication.OAuth.Tests.csproj
@@ -1,7 +1,9 @@
+
+
- netcoreapp2.2
+ netcoreapp3.0
latest
Volo.Abp.AspNetCore.Authentication.OAuth.Tests
Volo.Abp.AspNetCore.Authentication.OAuth.Tests
diff --git a/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo/Abp/AspNetCore/Authentication/OAuth/Claims/MultipleClaimAction_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo/Abp/AspNetCore/Authentication/OAuth/Claims/MultipleClaimAction_Tests.cs
index fac9e33e29..bf869fc809 100644
--- a/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo/Abp/AspNetCore/Authentication/OAuth/Claims/MultipleClaimAction_Tests.cs
+++ b/framework/test/Volo.Abp.AspNetCore.Authentication.OAuth.Tests/Volo/Abp/AspNetCore/Authentication/OAuth/Claims/MultipleClaimAction_Tests.cs
@@ -1,5 +1,6 @@
using System.Linq;
using System.Security.Claims;
+using System.Text.Json;
using Newtonsoft.Json.Linq;
using Shouldly;
using Volo.Abp.Security.Claims;
@@ -12,13 +13,12 @@ namespace Volo.Abp.AspNetCore.Authentication.OAuth.Claims
[Fact]
public void Should_Set_Single_Value()
{
- var jObject = JObject.Parse(@"{
+ var jObject = JsonDocument.Parse(@"{
""sub"": ""71054539-0e48-af28-5e7a-39e4e42d8ea5"",
""role"": ""admin""
}");
-
var claimsIdentity = new ClaimsIdentity();
- new MultipleClaimAction(AbpClaimTypes.Role, "role").Run(jObject, claimsIdentity, null);
+ new MultipleClaimAction(AbpClaimTypes.Role, "role").Run(jObject.RootElement, claimsIdentity, null);
var claims = claimsIdentity.FindAll(AbpClaimTypes.Role).ToList();
claims.Count.ShouldBe(1);
claims[0].Value.ShouldBe("admin");
@@ -27,7 +27,7 @@ namespace Volo.Abp.AspNetCore.Authentication.OAuth.Claims
[Fact]
public void Should_Set_Multiple_Values()
{
- var jObject = JObject.Parse(@"{
+ var jObject = JsonDocument.Parse(@"{
""sub"": ""71054539-0e48-af28-5e7a-39e4e42d8ea5"",
""role"": [
""admin"",
@@ -36,7 +36,7 @@ namespace Volo.Abp.AspNetCore.Authentication.OAuth.Claims
}");
var claimsIdentity = new ClaimsIdentity();
- new MultipleClaimAction(AbpClaimTypes.Role, "role").Run(jObject, claimsIdentity, null);
+ new MultipleClaimAction(AbpClaimTypes.Role, "role").Run(jObject.RootElement, claimsIdentity, null);
var claims = claimsIdentity.FindAll(AbpClaimTypes.Role).ToList();
claims.Count.ShouldBe(2);
claims[0].Value.ShouldBe("admin");
diff --git a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj
index f08d5b1ac2..61d430d984 100644
--- a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj
+++ b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo.Abp.AspNetCore.MultiTenancy.Tests.csproj
@@ -1,13 +1,11 @@
+
+
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.AspNetCore.MultiTenancy.Tests
Volo.Abp.AspNetCore.MultiTenancy.Tests
- true
- false
- false
- false
diff --git a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/App/Startup.cs b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/App/Startup.cs
index 1af71d75e8..05b724b9c3 100644
--- a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/App/Startup.cs
+++ b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/App/Startup.cs
@@ -12,7 +12,7 @@ namespace Volo.Abp.AspNetCore.App
services.AddApplication();
}
- public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
+ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
{
app.InitializeApplication();
}
diff --git a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancyTestBase.cs b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancyTestBase.cs
index 9dc083b3f1..ecc9d055ca 100644
--- a/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancyTestBase.cs
+++ b/framework/test/Volo.Abp.AspNetCore.MultiTenancy.Tests/Volo/Abp/AspNetCore/MultiTenancy/AspNetCoreMultiTenancyTestBase.cs
@@ -1,8 +1,7 @@
-using Volo.Abp.AspNetCore.App;
namespace Volo.Abp.AspNetCore.MultiTenancy
{
- public abstract class AspNetCoreMultiTenancyTestBase : AbpAspNetCoreTestBase
+ public abstract class AspNetCoreMultiTenancyTestBase : AbpAspNetCoreTestBase
{
}
diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Properties/launchSettings.json b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Properties/launchSettings.json
new file mode 100644
index 0000000000..fcf34f54da
--- /dev/null
+++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:55482/",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "Volo.Abp.AspNetCore.Mvc.Tests": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "http://localhost:55483/"
+ }
+ }
+}
\ No newline at end of file
diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj
index 0f4fabd553..93143bfbe0 100644
--- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj
+++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo.Abp.AspNetCore.Mvc.Tests.csproj
@@ -1,17 +1,17 @@
-
+
+
+
- netcoreapp2.2
+ netcoreapp3.0
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
Volo.Abp.AspNetCore.Mvc.Tests
Volo.Abp.AspNetCore.Mvc.Tests
true
true
- false
- false
- false
true
true
+ true
@@ -20,7 +20,6 @@
-
diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcTestModule.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcTestModule.cs
index eb0fc1ef48..28b5ee8b1f 100644
--- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcTestModule.cs
+++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/AbpAspNetCoreMvcTestModule.cs
@@ -69,6 +69,9 @@ namespace Volo.Abp.AspNetCore.Mvc
typeof(AbpUiResource),
typeof(AbpValidationResource)
).AddVirtualJson("/Volo/Abp/AspNetCore/Mvc/Localization/Resource");
+
+ options.Languages.Add(new LanguageInfo("en", "en", "English"));
+ options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe"));
});
}
@@ -77,10 +80,14 @@ namespace Volo.Abp.AspNetCore.Mvc
var app = context.GetApplicationBuilder();
app.UseCorrelationId();
+ app.UseVirtualFiles();
+ app.UseAbpRequestLocalization();
+ app.UseRouting();
app.UseMiddleware();
+ app.UseAuthorization();
app.UseAuditing();
app.UseUnitOfWork();
- app.UseMvcWithDefaultRoute();
+ app.UseMvcWithDefaultRouteAndArea();
}
}
}
diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpApiDefinitionController_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpApiDefinitionController_Tests.cs
new file mode 100644
index 0000000000..44b206e462
--- /dev/null
+++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/ApiExploring/AbpApiDefinitionController_Tests.cs
@@ -0,0 +1,17 @@
+using System.Threading.Tasks;
+using Shouldly;
+using Volo.Abp.Http.Modeling;
+using Xunit;
+
+namespace Volo.Abp.AspNetCore.Mvc.ApiExploring
+{
+ public class AbpApiDefinitionController_Tests : AspNetCoreMvcTestBase
+ {
+ [Fact]
+ public async Task GetAsync()
+ {
+ var model = await GetResponseAsObjectAsync("/api/abp/api-definition");
+ model.ShouldNotBeNull();
+ }
+ }
+}
diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Startup.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Startup.cs
index 458bbd8827..9ae46be82f 100644
--- a/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Startup.cs
+++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Tests/Volo/Abp/AspNetCore/Mvc/Startup.cs
@@ -18,7 +18,7 @@ namespace Volo.Abp.AspNetCore.Mvc
return services.BuildServiceProviderFromFactory();
}
- public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
+ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
{
app.InitializeApplication();
}
diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj
index 3e92a569bc..7b58c9c738 100644
--- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj
+++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests.csproj
@@ -1,15 +1,14 @@
+
+
- netcoreapp2.2
+ netcoreapp3.0
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests
Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests
true
true
- false
- false
- false
true
true
diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/TestStartup.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/TestStartup.cs
index da23c66e9f..3a140e35d4 100644
--- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/TestStartup.cs
+++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.Tests/Volo/Abp/AspNetCore/Mvc/UI/Bootstrap/Demo/TestStartup.cs
@@ -18,7 +18,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo
return services.BuildServiceProviderFromFactory();
}
- public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
+ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
{
app.InitializeApplication();
}
diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/AbpAspNetCoreMvcUiBootstrapDemoModule.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/AbpAspNetCoreMvcUiBootstrapDemoModule.cs
index ce9734914d..e14e2336d9 100644
--- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/AbpAspNetCoreMvcUiBootstrapDemoModule.cs
+++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/AbpAspNetCoreMvcUiBootstrapDemoModule.cs
@@ -1,5 +1,5 @@
using Microsoft.AspNetCore.Builder;
-using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.Hosting;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic;
using Volo.Abp.Autofac;
using Volo.Abp.Modularity;
@@ -22,9 +22,9 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo
app.UseDeveloperExceptionPage();
}
+ app.UseRouting();
app.UseVirtualFiles();
-
- app.UseMvcWithDefaultRoute();
+ app.UseMvcWithDefaultRouteAndArea();
}
}
}
\ No newline at end of file
diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Program.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Program.cs
index 4ee4949d50..0941475418 100644
--- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Program.cs
+++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Program.cs
@@ -1,6 +1,7 @@
using System;
using System.IO;
using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.Hosting;
using Serilog;
using Serilog.Events;
@@ -20,7 +21,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo
try
{
Log.Information("Starting web host.");
- BuildWebHostInternal(args).Run();
+ BuildWebHostInternal(args).Build().Run();
return 0;
}
catch (Exception ex)
@@ -34,13 +35,20 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo
}
}
- internal static IWebHost BuildWebHostInternal(string[] args) =>
- new WebHostBuilder()
- .UseKestrel()
- .UseContentRoot(Directory.GetCurrentDirectory())
- .UseIISIntegration()
- .UseStartup()
- .UseSerilog()
- .Build();
+ //internal static IWebHost BuildWebHostInternal(string[] args) =>
+ // new WebHostBuilder()
+ // .UseKestrel()
+ // .UseContentRoot(Directory.GetCurrentDirectory())
+ // .UseIISIntegration()
+ // .UseStartup()
+ // .UseSerilog()
+ // .Build();
+
+ internal static IHostBuilder BuildWebHostInternal(string[] args) =>
+ Host.CreateDefaultBuilder(args)
+ .ConfigureWebHostDefaults(webBuilder =>
+ {
+ webBuilder.UseStartup();
+ });
}
}
diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Startup.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Startup.cs
index ffd3ca47be..0497fe5216 100644
--- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Startup.cs
+++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Startup.cs
@@ -7,14 +7,14 @@ namespace Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo
{
public class Startup
{
- public IServiceProvider ConfigureServices(IServiceCollection services)
+ public void ConfigureServices(IServiceCollection services)
{
services.AddApplication(options =>
{
options.UseAutofac();
});
- return services.BuildServiceProviderFromFactory();
+ //return services.BuildServiceProviderFromFactory();
}
public void Configure(IApplicationBuilder app, ILoggerFactory loggerFactory)
diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj
index c5a4731256..eb9f5afd9c 100644
--- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj
+++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.Demo.csproj
@@ -1,12 +1,13 @@
+
+
- netcoreapp2.2
+ netcoreapp3.0
-
-
+
diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Properties/launchSettings.json b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Properties/launchSettings.json
new file mode 100644
index 0000000000..9e97dc2b61
--- /dev/null
+++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:55480/",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "Volo.Abp.AspNetCore.Mvc.UI.Tests": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "http://localhost:55481/"
+ }
+ }
+}
\ No newline at end of file
diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj
index cfbe4ad40d..b63efadfda 100644
--- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj
+++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo.Abp.AspNetCore.Mvc.UI.Tests.csproj
@@ -1,22 +1,20 @@
-
+
+
+
- netcoreapp2.2
+ netcoreapp3.0
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
Volo.Abp.AspNetCore.Mvc.UI.Tests
Volo.Abp.AspNetCore.Mvc.UI.Tests
true
true
- false
- false
- false
true
true
-
diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo/Abp/AspNetCore/Mvc/UI/Startup.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo/Abp/AspNetCore/Mvc/UI/Startup.cs
index 1f4182110a..124a103da2 100644
--- a/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo/Abp/AspNetCore/Mvc/UI/Startup.cs
+++ b/framework/test/Volo.Abp.AspNetCore.Mvc.UI.Tests/Volo/Abp/AspNetCore/Mvc/UI/Startup.cs
@@ -19,7 +19,7 @@ namespace Volo.Abp.AspNetCore.Mvc.UI
return services.BuildServiceProviderFromFactory();
}
- public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
+ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
{
app.InitializeApplication();
}
diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Properties/launchSettings.json b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Properties/launchSettings.json
new file mode 100644
index 0000000000..836bd1af47
--- /dev/null
+++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:55487/",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "Volo.Abp.AspNetCore.Mvc.Versioning.Tests": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "http://localhost:55488/"
+ }
+ }
+}
\ No newline at end of file
diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj
index 3c9ce2301f..8d954b0b2a 100644
--- a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj
+++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo.Abp.AspNetCore.Mvc.Versioning.Tests.csproj
@@ -1,22 +1,20 @@
-
+
+
+
- netcoreapp2.2
+ netcoreapp3.0
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
Volo.Abp.AspNetCore.Mvc.Versioning.Tests
Volo.Abp.AspNetCore.Mvc.Versioning.Tests
true
true
- false
- false
- false
true
true
-
diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/AbpAspNetCoreMvcVersioningTestModule.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/AbpAspNetCoreMvcVersioningTestModule.cs
index 3ea9103e9e..99a155f3b7 100644
--- a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/AbpAspNetCoreMvcVersioningTestModule.cs
+++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/AbpAspNetCoreMvcVersioningTestModule.cs
@@ -66,7 +66,8 @@ namespace Volo.Abp.AspNetCore.Mvc.Versioning
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
- app.UseMvcWithDefaultRoute();
+ app.UseRouting();
+ app.UseMvcWithDefaultRouteAndArea();
}
}
}
diff --git a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/Startup.cs b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/Startup.cs
index 4d9f831670..79985de769 100644
--- a/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/Startup.cs
+++ b/framework/test/Volo.Abp.AspNetCore.Mvc.Versioning.Tests/Volo/Abp/AspNetCore/Mvc/Versioning/Startup.cs
@@ -19,7 +19,7 @@ namespace Volo.Abp.AspNetCore.Mvc.Versioning
return services.BuildServiceProviderFromFactory();
}
- public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
+ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
{
app.InitializeApplication();
}
diff --git a/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj b/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj
index e52c426e43..061e1640ce 100644
--- a/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj
+++ b/framework/test/Volo.Abp.AspNetCore.Tests/Volo.Abp.AspNetCore.Tests.csproj
@@ -1,18 +1,29 @@
+
+
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.AspNetCore.Tests
Volo.Abp.AspNetCore.Tests
true
false
false
false
+ true
+ false
+ true
+
+
+
+
+
+
diff --git a/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/AbpAspNetCoreTestBase.cs b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/AbpAspNetCoreTestBase.cs
index 33beb9d62c..dd5edff807 100644
--- a/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/AbpAspNetCoreTestBase.cs
+++ b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/AbpAspNetCoreTestBase.cs
@@ -1,5 +1,7 @@
+using System.Globalization;
using System.Net;
using System.Net.Http;
+using System.Net.Http.Headers;
using System.Threading.Tasks;
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
@@ -8,6 +10,11 @@ using Volo.Abp.AspNetCore.TestBase;
namespace Volo.Abp.AspNetCore
{
+ public class AbpAspNetCoreTestBase : AbpAspNetCoreTestBase
+ {
+
+ }
+
public abstract class AbpAspNetCoreTestBase : AbpAspNetCoreIntegratedTestBase
where TStartup : class
{
@@ -25,15 +32,21 @@ namespace Volo.Abp.AspNetCore
protected virtual async Task GetResponseAsStringAsync(string url, HttpStatusCode expectedStatusCode = HttpStatusCode.OK)
{
- var response = await GetResponseAsync(url, expectedStatusCode);
- return await response.Content.ReadAsStringAsync();
+ using (var response = await GetResponseAsync(url, expectedStatusCode))
+ {
+ return await response.Content.ReadAsStringAsync();
+ }
}
protected virtual async Task GetResponseAsync(string url, HttpStatusCode expectedStatusCode = HttpStatusCode.OK)
{
- var response = await Client.GetAsync(url);
- response.StatusCode.ShouldBe(expectedStatusCode);
- return response;
+ using (var requestMessage = new HttpRequestMessage(HttpMethod.Get, url))
+ {
+ requestMessage.Headers.Add("Accept-Language", CultureInfo.CurrentUICulture.Name);
+ var response = await Client.SendAsync(requestMessage);
+ response.StatusCode.ShouldBe(expectedStatusCode);
+ return response;
+ }
}
}
}
\ No newline at end of file
diff --git a/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/AbpAspNetCoreTestModule.cs b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/AbpAspNetCoreTestModule.cs
new file mode 100644
index 0000000000..fafd5794a6
--- /dev/null
+++ b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/AbpAspNetCoreTestModule.cs
@@ -0,0 +1,53 @@
+using System;
+using System.IO;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.DependencyInjection;
+using Volo.Abp.AspNetCore.TestBase;
+using Volo.Abp.Autofac;
+using Volo.Abp.Localization;
+using Volo.Abp.Modularity;
+using Volo.Abp.VirtualFileSystem;
+
+namespace Volo.Abp.AspNetCore
+{
+ [DependsOn(
+ typeof(AbpAspNetCoreTestBaseModule),
+ typeof(AbpAspNetCoreModule),
+ typeof(AbpAutofacModule)
+ )]
+ public class AbpAspNetCoreTestModule : AbpModule
+ {
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ var hostingEnvironment = context.Services.GetHostingEnvironment();
+
+ Configure(options =>
+ {
+ options.FileSets.AddEmbedded();
+ //options.FileSets.ReplaceEmbeddedByPhysical(FindProjectPath(hostingEnvironment));
+ });
+ }
+
+ public override void OnApplicationInitialization(ApplicationInitializationContext context)
+ {
+ var app = context.GetApplicationBuilder();
+
+ app.UseCorrelationId();
+ app.UseVirtualFiles();
+ }
+
+ private string FindProjectPath(IWebHostEnvironment hostEnvironment)
+ {
+ var directory = new DirectoryInfo(hostEnvironment.ContentRootPath);
+
+ while (directory != null && directory.Name != "Volo.Abp.AspNetCore.Tests")
+ {
+ directory = directory.Parent;
+ }
+
+ return directory?.FullName
+ ?? throw new Exception("Could not find the project path by beginning from " + hostEnvironment.ContentRootPath + ", going through to parents and looking for Volo.Abp.AspNetCore.Tests");
+ }
+ }
+}
diff --git a/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/Startup.cs b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/Startup.cs
new file mode 100644
index 0000000000..7f95713274
--- /dev/null
+++ b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/Startup.cs
@@ -0,0 +1,26 @@
+using System;
+using Microsoft.AspNetCore.Builder;
+using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Logging;
+
+namespace Volo.Abp.AspNetCore
+{
+ public class Startup
+ {
+ public IServiceProvider ConfigureServices(IServiceCollection services)
+ {
+ services.AddApplication(options =>
+ {
+ options.UseAutofac();
+ });
+
+ return services.BuildServiceProviderFromFactory();
+ }
+
+ public void Configure(IApplicationBuilder app, IWebHostEnvironment env, ILoggerFactory loggerFactory)
+ {
+ app.InitializeApplication();
+ }
+ }
+}
diff --git a/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/VirtualFileSystem/VirtualFileSystem_Tests.cs b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/VirtualFileSystem/VirtualFileSystem_Tests.cs
new file mode 100644
index 0000000000..142d44baec
--- /dev/null
+++ b/framework/test/Volo.Abp.AspNetCore.Tests/Volo/Abp/AspNetCore/VirtualFileSystem/VirtualFileSystem_Tests.cs
@@ -0,0 +1,19 @@
+using System.Threading.Tasks;
+using Shouldly;
+using Xunit;
+
+namespace Volo.Abp.AspNetCore.VirtualFileSystem
+{
+ public class VirtualFileSystem_Tests : AbpAspNetCoreTestBase
+ {
+ [Fact]
+ public async Task Get_Virtual_File()
+ {
+ var result = await GetResponseAsStringAsync(
+ "/SampleFiles/test1.js"
+ );
+
+ result.ShouldBe("test1.js-content");
+ }
+ }
+}
diff --git a/framework/test/Volo.Abp.AspNetCore.Tests/wwwroot/SampleFiles/test1.js b/framework/test/Volo.Abp.AspNetCore.Tests/wwwroot/SampleFiles/test1.js
new file mode 100644
index 0000000000..20a6856cb7
--- /dev/null
+++ b/framework/test/Volo.Abp.AspNetCore.Tests/wwwroot/SampleFiles/test1.js
@@ -0,0 +1 @@
+test1.js-content
\ No newline at end of file
diff --git a/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj b/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj
index aa26dffb44..ee1e2441a6 100644
--- a/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj
+++ b/framework/test/Volo.Abp.Auditing.Tests/Volo.Abp.Auditing.Tests.csproj
@@ -1,14 +1,12 @@
+
+
- netcoreapp2.2
- latest
+ netcoreapp3.0
Volo.Abp.Auditing.Tests
Volo.Abp.Auditing.Tests
true
- false
- false
- false
diff --git a/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj b/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj
index a76bcabb37..817533079b 100644
--- a/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj
+++ b/framework/test/Volo.Abp.Authorization.Tests/Volo.Abp.Authorization.Tests.csproj
@@ -1,14 +1,12 @@
+
+
- netcoreapp2.2
- latest
+ netcoreapp3.0
Volo.Abp.Authorization.Tests
Volo.Abp.Authorization.Tests
true
- false
- false
- false
diff --git a/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj b/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj
index 234c405eda..d8e2e5ec2b 100644
--- a/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj
+++ b/framework/test/Volo.Abp.AutoMapper.Tests/Volo.Abp.AutoMapper.Tests.csproj
@@ -1,13 +1,11 @@
+
+
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.AutoMapper.Tests
Volo.Abp.AutoMapper.Tests
- true
- false
- false
- false
diff --git a/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj b/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj
index 1a9016ee3a..96088ec3e4 100644
--- a/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj
+++ b/framework/test/Volo.Abp.Autofac.Tests/Volo.Abp.Autofac.Tests.csproj
@@ -1,13 +1,12 @@
+
+
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.Autofac.Tests
Volo.Abp.Autofac.Tests
true
- false
- false
- false
diff --git a/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj b/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj
index 31e9c91779..f8a27d020b 100644
--- a/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj
+++ b/framework/test/Volo.Abp.BackgroundJobs.Tests/Volo.Abp.BackgroundJobs.Tests.csproj
@@ -1,14 +1,11 @@
+
+
- netcoreapp2.2
- latest
+ netcoreapp3.0
Volo.Abp.BackgroundJobs.Tests
Volo.Abp.BackgroundJobs.Tests
- true
- false
- false
- false
diff --git a/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj b/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj
index 8efd87f2b6..1c4818159b 100644
--- a/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj
+++ b/framework/test/Volo.Abp.Caching.Tests/Volo.Abp.Caching.Tests.csproj
@@ -1,14 +1,11 @@
+
+
- netcoreapp2.2
- latest
+ netcoreapp3.0
Volo.Abp.Caching.Tests
Volo.Abp.Caching.Tests
- true
- false
- false
- false
diff --git a/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj b/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj
index 34c30b1600..97988f8b3f 100644
--- a/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj
+++ b/framework/test/Volo.Abp.Castle.Core.Tests/Volo.Abp.Castle.Core.Tests.csproj
@@ -1,13 +1,9 @@
+
+
- netcoreapp2.2
- Volo.Abp.Castle.Core.Tests
- Volo.Abp.Castle.Core.Tests
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.Cli.Core.Tests/Volo.Abp.Cli.Core.Tests.csproj b/framework/test/Volo.Abp.Cli.Core.Tests/Volo.Abp.Cli.Core.Tests.csproj
index d2535076b1..ba75eb73ca 100644
--- a/framework/test/Volo.Abp.Cli.Core.Tests/Volo.Abp.Cli.Core.Tests.csproj
+++ b/framework/test/Volo.Abp.Cli.Core.Tests/Volo.Abp.Cli.Core.Tests.csproj
@@ -1,8 +1,9 @@
+
+
- netcoreapp2.2
- latest
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj b/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj
index 957c255d2b..0812895ae0 100644
--- a/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj
+++ b/framework/test/Volo.Abp.Core.Tests/Volo.Abp.Core.Tests.csproj
@@ -1,13 +1,9 @@
+
+
- netcoreapp2.2
- Volo.Abp.Core.Tests
- Volo.Abp.Core.Tests
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj b/framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj
index 8e9ff07634..7f08897bcd 100644
--- a/framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj
+++ b/framework/test/Volo.Abp.Dapper.Tests/Volo.Abp.Dapper.Tests.csproj
@@ -1,13 +1,9 @@
+
+
- netcoreapp2.2
- Volo.Abp.Dapper.Tests
- Volo.Abp.Dapper.Tests
- true
- false
- false
- false
+ netcoreapp3.0
@@ -18,7 +14,7 @@
-
+
\ No newline at end of file
diff --git a/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj b/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj
index b7895d25a0..65b50126bd 100644
--- a/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj
+++ b/framework/test/Volo.Abp.Data.Tests/Volo.Abp.Data.Tests.csproj
@@ -1,13 +1,9 @@
+
+
- netcoreapp2.2
- Volo.Abp.Data.Tests
- Volo.Abp.Data.Tests
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj b/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj
index 42de4f22f2..1ed24ead80 100644
--- a/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj
+++ b/framework/test/Volo.Abp.Ddd.Tests/Volo.Abp.Ddd.Tests.csproj
@@ -1,14 +1,9 @@
+
+
- netcoreapp2.2
- latest
- Volo.Abp.Ddd.Tests
- Volo.Abp.Ddd.Tests
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Entities/EntityHelper_Tests.cs b/framework/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Entities/EntityHelper_Tests.cs
new file mode 100644
index 0000000000..2ad6a45b05
--- /dev/null
+++ b/framework/test/Volo.Abp.Ddd.Tests/Volo/Abp/Domain/Entities/EntityHelper_Tests.cs
@@ -0,0 +1,57 @@
+using System;
+using Shouldly;
+using Xunit;
+
+namespace Volo.Abp.Domain.Entities
+{
+ public class EntityHelper_Tests
+ {
+ [Fact]
+ public static void SetId_DerivedFromAggregateRoot()
+ {
+ var idValue = Guid.NewGuid();
+ var myEntityDerivedFromAggregateRoot = new MyEntityDerivedFromAggregateRoot();
+ EntityHelper.TrySetId(myEntityDerivedFromAggregateRoot, () => idValue, true);
+ myEntityDerivedFromAggregateRoot.Id.ShouldBe(idValue);
+ }
+
+ [Fact]
+ public static void SetId_ImplementsIEntity()
+ {
+ var idValue = Guid.NewGuid();
+ var myEntityImplementsIEntity = new MyEntityImplementsIEntity();
+ EntityHelper.TrySetId(myEntityImplementsIEntity, () => idValue, true);
+ myEntityImplementsIEntity.Id.ShouldBe(idValue);
+ }
+
+ [Fact]
+ public static void SetId_DisablesIdGeneration()
+ {
+ var idValue = Guid.NewGuid();
+ var myEntityDisablesIdGeneration = new MyEntityDisablesIdGeneration();
+ EntityHelper.TrySetId(myEntityDisablesIdGeneration, () => idValue, true);
+ myEntityDisablesIdGeneration.Id.ShouldBe(default);
+ }
+
+ private class MyEntityDerivedFromAggregateRoot : AggregateRoot
+ {
+
+ }
+
+ private class MyEntityImplementsIEntity : IEntity
+ {
+ public Guid Id { get; protected set; }
+
+ public object[] GetKeys()
+ {
+ return new object[] { Id };
+ }
+ }
+
+ private class MyEntityDisablesIdGeneration : Entity
+ {
+ [DisableIdGeneration]
+ public override Guid Id { get; protected set; }
+ }
+ }
+}
diff --git a/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj b/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj
index ec4d2f8bda..bc1296cbc8 100644
--- a/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj
+++ b/framework/test/Volo.Abp.Emailing.Tests/Volo.Abp.Emailing.Tests.csproj
@@ -1,12 +1,9 @@
+
+
- netcoreapp2.2
- latest
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo.Abp.EntityFrameworkCore.Tests.SecondContext.csproj b/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo.Abp.EntityFrameworkCore.Tests.SecondContext.csproj
index 14453442c6..bace3a67e5 100644
--- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo.Abp.EntityFrameworkCore.Tests.SecondContext.csproj
+++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo.Abp.EntityFrameworkCore.Tests.SecondContext.csproj
@@ -1,15 +1,12 @@
-
+
+
+
- netcoreapp2.2
+ netcoreapp3.0
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
- Volo.Abp.EntityFrameworkCore.Tests.SecondContext
- Volo.Abp.EntityFrameworkCore.Tests.SecondContext
true
true
- false
- false
- false
true
true
diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo/Abp/EntityFrameworkCore/TestApp/SecondContext/BookInSecondDbContext.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo/Abp/EntityFrameworkCore/TestApp/SecondContext/BookInSecondDbContext.cs
index 0e22533c11..59c568ed9d 100644
--- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo/Abp/EntityFrameworkCore/TestApp/SecondContext/BookInSecondDbContext.cs
+++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo/Abp/EntityFrameworkCore/TestApp/SecondContext/BookInSecondDbContext.cs
@@ -6,5 +6,16 @@ namespace Volo.Abp.EntityFrameworkCore.TestApp.SecondContext
public class BookInSecondDbContext : AggregateRoot
{
public string Name { get; set; }
+
+ public BookInSecondDbContext()
+ {
+
+ }
+
+ public BookInSecondDbContext(Guid id, string name)
+ : base(id)
+ {
+ Name = name;
+ }
}
}
\ No newline at end of file
diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo/Abp/EntityFrameworkCore/TestApp/SecondContext/SecondContextTestDataBuilder.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo/Abp/EntityFrameworkCore/TestApp/SecondContext/SecondContextTestDataBuilder.cs
index 59ddc2acdf..0b89576f34 100644
--- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo/Abp/EntityFrameworkCore/TestApp/SecondContext/SecondContextTestDataBuilder.cs
+++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests.SecondContext/Volo/Abp/EntityFrameworkCore/TestApp/SecondContext/SecondContextTestDataBuilder.cs
@@ -18,11 +18,12 @@ namespace Volo.Abp.EntityFrameworkCore.TestApp.SecondContext
public void Build()
{
- _bookRepository.Insert(new BookInSecondDbContext
- {
- Id = _guidGenerator.Create(),
- Name = "TestBook1"
- });
+ _bookRepository.Insert(
+ new BookInSecondDbContext(
+ _guidGenerator.Create(),
+ "TestBook1"
+ )
+ );
}
}
}
\ No newline at end of file
diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj
index e70921b325..633df17917 100644
--- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj
+++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo.Abp.EntityFrameworkCore.Tests.csproj
@@ -1,13 +1,9 @@
+
+
- netcoreapp2.2
- Volo.Abp.EntityFrameworkCore.Tests
- Volo.Abp.EntityFrameworkCore.Tests
- true
- false
- false
- false
+ netcoreapp3.0
@@ -20,7 +16,7 @@
-
+
diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Repositories/Repository_Basic_Tests_With_Int_Pk.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Repositories/Repository_Basic_Tests_With_Int_Pk.cs
new file mode 100644
index 0000000000..44cf993be8
--- /dev/null
+++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Repositories/Repository_Basic_Tests_With_Int_Pk.cs
@@ -0,0 +1,9 @@
+using Volo.Abp.TestApp.Testing;
+
+namespace Volo.Abp.EntityFrameworkCore.Repositories
+{
+ public class Repository_Basic_Tests_With_Int_Pk : Repository_Basic_Tests_With_Int_Pk
+ {
+
+ }
+}
\ No newline at end of file
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 cb9726d6b4..0f9def32f0 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
@@ -15,6 +15,8 @@ namespace Volo.Abp.EntityFrameworkCore
public DbSet Books { get; set; }
+ public DbSet EntityWithIntPks { get; set; }
+
public TestMigrationsDbContext(DbContextOptions options)
: base(options)
{
diff --git a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Transactions/Transaction_Tests.cs b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Transactions/Transaction_Tests.cs
index 030b236637..613c42894c 100644
--- a/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Transactions/Transaction_Tests.cs
+++ b/framework/test/Volo.Abp.EntityFrameworkCore.Tests/Volo/Abp/EntityFrameworkCore/Transactions/Transaction_Tests.cs
@@ -80,7 +80,7 @@ namespace Volo.Abp.EntityFrameworkCore.Transactions
_unitOfWorkManager.Current.ShouldNotBeNull();
await _personRepository.InsertAsync(new Person(personId, "Adam", 42));
- await _bookRepository.InsertAsync(new BookInSecondDbContext { Id = bookId, Name = bookId.ToString() });
+ await _bookRepository.InsertAsync(new BookInSecondDbContext(bookId, bookId.ToString()));
await _unitOfWorkManager.Current.SaveChangesAsync();
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 00e052d2dd..bfcecdeb65 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
@@ -13,6 +13,8 @@ namespace Volo.Abp.TestApp.EntityFrameworkCore
public DbSet DummyEntities { get; set; }
+ public DbSet EntityWithIntPks { get; set; }
+
public TestAppDbContext(DbContextOptions options)
: base(options)
{
diff --git a/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj b/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj
index eb0f746272..a58e10af2d 100644
--- a/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj
+++ b/framework/test/Volo.Abp.EventBus.Tests/Volo.Abp.EventBus.Tests.csproj
@@ -1,14 +1,9 @@
+
+
- netcoreapp2.2
- latest
- Volo.Abp.EventBus.Tests
- Volo.Abp.EventBus.Tests
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/GenericInheritanceTest.cs b/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/GenericInheritanceTest.cs
index d770a81325..eeec26b166 100644
--- a/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/GenericInheritanceTest.cs
+++ b/framework/test/Volo.Abp.EventBus.Tests/Volo/Abp/EventBus/Local/GenericInheritanceTest.cs
@@ -21,7 +21,7 @@ namespace Volo.Abp.EventBus.Local
return Task.CompletedTask;
});
- await LocalEventBus.PublishAsync(new EntityUpdatedEventData(new Person { Id = 42 }));
+ await LocalEventBus.PublishAsync(new EntityUpdatedEventData(new Person(42)));
triggeredEvent.ShouldBe(true);
}
@@ -39,19 +39,37 @@ namespace Volo.Abp.EventBus.Local
return Task.CompletedTask;
});
- await LocalEventBus.PublishAsync(new EntityChangedEventData(new Student { Id = 42 }));
+ await LocalEventBus.PublishAsync(new EntityChangedEventData(new Student(42)));
triggeredEvent.ShouldBe(true);
}
-
+
public class Person : Entity
{
-
+ public Person()
+ {
+
+ }
+
+ public Person(int id)
+ : base(id)
+ {
+
+ }
}
public class Student : Person
{
-
+ public Student()
+ {
+
+ }
+
+ public Student(int id)
+ : base(id)
+ {
+
+ }
}
}
}
\ No newline at end of file
diff --git a/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj b/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj
index dd7436e1d2..d7b28568f3 100644
--- a/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj
+++ b/framework/test/Volo.Abp.Features.Tests/Volo.Abp.Features.Tests.csproj
@@ -1,14 +1,9 @@
+
+
- netcoreapp2.2
- latest
- Volo.Abp.Features.Tests
- Volo.Abp.Features.Tests
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj b/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj
index 089dbcab38..e3e95e182b 100644
--- a/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj
+++ b/framework/test/Volo.Abp.FluentValidation.Tests/Volo.Abp.FluentValidation.Tests.csproj
@@ -1,13 +1,9 @@
+
+
- netcoreapp2.2
- Volo.Abp.FluentValidation.Tests
- Volo.Abp.FluentValidation.Tests
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj b/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj
index 8800d492ea..a4bcae448b 100644
--- a/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj
+++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo.Abp.Http.Client.Tests.csproj
@@ -1,13 +1,9 @@
+
+
- netcoreapp2.2
- Volo.Abp.Http.Client.Tests
- Volo.Abp.Http.Client.Tests
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/AbpHttpClientTestBase.cs b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/AbpHttpClientTestBase.cs
new file mode 100644
index 0000000000..7dc930daa1
--- /dev/null
+++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/AbpHttpClientTestBase.cs
@@ -0,0 +1,9 @@
+using Volo.Abp.AspNetCore;
+
+namespace Volo.Abp.Http
+{
+ public abstract class AbpHttpClientTestBase : AbpAspNetCoreTestBase
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/AbpHttpTestModule.cs b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/AbpHttpClientTestModule.cs
similarity index 56%
rename from framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/AbpHttpTestModule.cs
rename to framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/AbpHttpClientTestModule.cs
index 4ee13e7dc7..ecde843177 100644
--- a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/AbpHttpTestModule.cs
+++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/AbpHttpClientTestModule.cs
@@ -1,4 +1,5 @@
-using Microsoft.Extensions.DependencyInjection;
+using Microsoft.AspNetCore.Mvc.ApplicationParts;
+using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Http.Client;
using Volo.Abp.Http.DynamicProxying;
@@ -7,8 +8,11 @@ using Volo.Abp.TestApp;
namespace Volo.Abp.Http
{
- [DependsOn(typeof(AbpAspNetCoreMvcTestModule), typeof(AbpHttpClientModule))]
- public class AbpHttpTestModule : AbpModule
+ [DependsOn(
+ typeof(AbpHttpClientModule),
+ typeof(AbpAspNetCoreMvcTestModule)
+ )]
+ public class AbpHttpClientTestModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
@@ -19,6 +23,11 @@ namespace Volo.Abp.Http
{
options.RemoteServices.Default = new RemoteServiceConfiguration("/");
});
+
+ //This is needed after ASP.NET Core 3.0 upgrade.
+ context.Services.AddMvc()
+ .PartManager.ApplicationParts
+ .Add(new AssemblyPart(typeof(AbpAspNetCoreMvcModule).Assembly));
}
}
}
diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/AbpHttpTestBase.cs b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/AbpHttpTestBase.cs
deleted file mode 100644
index d2db4dc3ac..0000000000
--- a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/AbpHttpTestBase.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using Volo.Abp.AspNetCore;
-
-namespace Volo.Abp.Http
-{
- public abstract class AbpHttpTestBase : AbpAspNetCoreTestBase
- {
-
- }
-}
\ No newline at end of file
diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/PersonAppServiceClientProxy_Tests.cs b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/PersonAppServiceClientProxy_Tests.cs
index 629d979d95..aeae7ef1b4 100644
--- a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/PersonAppServiceClientProxy_Tests.cs
+++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/PersonAppServiceClientProxy_Tests.cs
@@ -5,6 +5,7 @@ using Microsoft.Extensions.DependencyInjection;
using Shouldly;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Domain.Repositories;
+using Volo.Abp.Http.Modeling;
using Volo.Abp.TestApp.Application;
using Volo.Abp.TestApp.Application.Dto;
using Volo.Abp.TestApp.Domain;
@@ -12,7 +13,7 @@ using Xunit;
namespace Volo.Abp.Http.DynamicProxying
{
- public class PersonAppServiceClientProxy_Tests : AbpHttpTestBase
+ public class PersonAppServiceClientProxy_Tests : AbpHttpClientTestBase
{
private readonly IPeopleAppService _peopleAppService;
private readonly IRepository _personRepository;
diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/RegularTestControllerClientProxy_Tests.cs b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/RegularTestControllerClientProxy_Tests.cs
index 1a59b39614..22d9354624 100644
--- a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/RegularTestControllerClientProxy_Tests.cs
+++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/DynamicProxying/RegularTestControllerClientProxy_Tests.cs
@@ -6,7 +6,7 @@ using Xunit;
namespace Volo.Abp.Http.DynamicProxying
{
- public class RegularTestControllerClientProxy_Tests : AbpHttpTestBase
+ public class RegularTestControllerClientProxy_Tests : AbpHttpClientTestBase
{
//TODO: Create a regular MVC Controller and add different parameter bindings, verbs and routes and test client proxy for it!
diff --git a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Startup.cs b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Startup.cs
index 961454d22a..4704128d9d 100644
--- a/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Startup.cs
+++ b/framework/test/Volo.Abp.Http.Client.Tests/Volo/Abp/Http/Startup.cs
@@ -1,8 +1,6 @@
using System;
using Microsoft.AspNetCore.Builder;
-using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
-using Microsoft.Extensions.Logging;
namespace Volo.Abp.Http
{
@@ -10,7 +8,7 @@ namespace Volo.Abp.Http
{
public IServiceProvider ConfigureServices(IServiceCollection services)
{
- services.AddApplication(options =>
+ services.AddApplication(options =>
{
options.UseAutofac();
});
@@ -19,7 +17,7 @@ namespace Volo.Abp.Http
return services.BuildServiceProviderFromFactory();
}
- public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
+ public void Configure(IApplicationBuilder app)
{
app.InitializeApplication();
}
diff --git a/framework/test/Volo.Abp.Ldap.Tests/Volo.Abp.Ldap.Tests.csproj b/framework/test/Volo.Abp.Ldap.Tests/Volo.Abp.Ldap.Tests.csproj
index c7e32be51a..6f16b2499e 100644
--- a/framework/test/Volo.Abp.Ldap.Tests/Volo.Abp.Ldap.Tests.csproj
+++ b/framework/test/Volo.Abp.Ldap.Tests/Volo.Abp.Ldap.Tests.csproj
@@ -1,9 +1,9 @@
+
+
- netcoreapp2.2
- latest
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj b/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj
index 4cc31224fc..68cc2bdb83 100644
--- a/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj
+++ b/framework/test/Volo.Abp.Localization.Tests/Volo.Abp.Localization.Tests.csproj
@@ -1,13 +1,9 @@
+
+
- netcoreapp2.2
- Volo.Abp.Localization.Tests
- Volo.Abp.Localization.Tests
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.MailKit.Tests/Volo.Abp.MailKit.Tests.csproj b/framework/test/Volo.Abp.MailKit.Tests/Volo.Abp.MailKit.Tests.csproj
index 09ea53af78..11a2ac7673 100644
--- a/framework/test/Volo.Abp.MailKit.Tests/Volo.Abp.MailKit.Tests.csproj
+++ b/framework/test/Volo.Abp.MailKit.Tests/Volo.Abp.MailKit.Tests.csproj
@@ -1,12 +1,9 @@
+
+
- netcoreapp2.2
- latest
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj b/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj
index 136dc408c6..e7d0eec2fc 100644
--- a/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj
+++ b/framework/test/Volo.Abp.MemoryDb.Tests/Volo.Abp.MemoryDb.Tests.csproj
@@ -1,13 +1,9 @@
+
+
- netcoreapp2.2
- Volo.Abp.MemoryDb.Tests
- Volo.Abp.MemoryDb.Tests
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/Repositories/Repository_Basic_Tests_With_Int_Pk.cs b/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/Repositories/Repository_Basic_Tests_With_Int_Pk.cs
new file mode 100644
index 0000000000..31cd74043d
--- /dev/null
+++ b/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/MemoryDb/Repositories/Repository_Basic_Tests_With_Int_Pk.cs
@@ -0,0 +1,9 @@
+using Volo.Abp.TestApp.Testing;
+
+namespace Volo.Abp.MemoryDb.Repositories
+{
+ public class Repository_Basic_Tests_With_Int_Pk : Repository_Basic_Tests_With_Int_Pk
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/TestApp/MemoryDb/TestAppMemoryDbContext.cs b/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/TestApp/MemoryDb/TestAppMemoryDbContext.cs
index 902c013ed8..09b134a078 100644
--- a/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/TestApp/MemoryDb/TestAppMemoryDbContext.cs
+++ b/framework/test/Volo.Abp.MemoryDb.Tests/Volo/Abp/TestApp/MemoryDb/TestAppMemoryDbContext.cs
@@ -8,7 +8,8 @@ namespace Volo.Abp.TestApp.MemoryDb
public class TestAppMemoryDbContext : MemoryDbContext
{
private static readonly Type[] EntityTypeList = {
- typeof(Person)
+ typeof(Person),
+ typeof(EntityWithIntPk)
};
public override IReadOnlyList GetEntityTypes()
diff --git a/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj b/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj
index 0605a51a7c..bbad58f4fa 100644
--- a/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj
+++ b/framework/test/Volo.Abp.MongoDB.Tests/Volo.Abp.MongoDB.Tests.csproj
@@ -1,13 +1,9 @@
+
+
- netcoreapp2.2
- Volo.Abp.MongoDB.Tests
- Volo.Abp.MongoDB.Tests
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/Repositories/Repository_Basic_Tests_With_Int_Pk.cs b/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/Repositories/Repository_Basic_Tests_With_Int_Pk.cs
new file mode 100644
index 0000000000..58914e8e50
--- /dev/null
+++ b/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/MongoDB/Repositories/Repository_Basic_Tests_With_Int_Pk.cs
@@ -0,0 +1,14 @@
+using Volo.Abp.TestApp.Testing;
+using Xunit;
+
+namespace Volo.Abp.MongoDB.Repositories
+{
+ public class Repository_Basic_Tests_With_Int_Pk : Repository_Basic_Tests_With_Int_Pk
+ {
+ [Fact(Skip = "Int PKs are not working for MongoDb")]
+ public override void Get()
+ {
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/TestApp/MongoDb/TestAppMongoDbContext.cs b/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/TestApp/MongoDb/TestAppMongoDbContext.cs
index fd7562f6df..03869ce566 100644
--- a/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/TestApp/MongoDb/TestAppMongoDbContext.cs
+++ b/framework/test/Volo.Abp.MongoDB.Tests/Volo/Abp/TestApp/MongoDb/TestAppMongoDbContext.cs
@@ -8,9 +8,11 @@ namespace Volo.Abp.TestApp.MongoDB
[ConnectionStringName("TestApp")]
public class TestAppMongoDbContext : AbpMongoDbContext, ITestAppMongoDbContext
{
- [MongoCollection("Persons")] //Intentially changed the collection name to test it
+ [MongoCollection("Persons")] //Intentionally changed the collection name to test it
public IMongoCollection People => Collection();
+ public IMongoCollection EntityWithIntPks => Collection();
+
public IMongoCollection Cities => Collection();
protected override void CreateModel(IMongoModelBuilder modelBuilder)
diff --git a/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj b/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj
index 1258956caf..17ce3073c5 100644
--- a/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj
+++ b/framework/test/Volo.Abp.MultiTenancy.Tests/Volo.Abp.MultiTenancy.Tests.csproj
@@ -1,13 +1,9 @@
+
+
- netcoreapp2.2
- Volo.Abp.MultiTenancy.Tests
- Volo.Abp.MultiTenancy.Tests
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj b/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj
index 696592c5d3..1534cb28f4 100644
--- a/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj
+++ b/framework/test/Volo.Abp.Security.Tests/Volo.Abp.Security.Tests.csproj
@@ -1,13 +1,9 @@
+
+
- netcoreapp2.2
- Volo.Abp.Security.Tests
- Volo.Abp.Security.Tests
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj b/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj
index b800df4fb0..65bb49d57a 100644
--- a/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj
+++ b/framework/test/Volo.Abp.Serialization.Tests/Volo.Abp.Serialization.Tests.csproj
@@ -1,14 +1,9 @@
+
+
- netcoreapp2.2
- latest
- Volo.Abp.Serialization.Tests
- Volo.Abp.Serialization.Tests
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj b/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj
index 419451777d..ef91443b2a 100644
--- a/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj
+++ b/framework/test/Volo.Abp.Settings.Tests/Volo.Abp.Settings.Tests.csproj
@@ -1,14 +1,9 @@
+
+
- netcoreapp2.2
- latest
- Volo.Abp.Settings.Tests
- Volo.Abp.Settings.Tests
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.Specifications.Tests/Volo.Abp.Specifications.Tests.csproj b/framework/test/Volo.Abp.Specifications.Tests/Volo.Abp.Specifications.Tests.csproj
index 3b1f95fabb..0594067fa5 100644
--- a/framework/test/Volo.Abp.Specifications.Tests/Volo.Abp.Specifications.Tests.csproj
+++ b/framework/test/Volo.Abp.Specifications.Tests/Volo.Abp.Specifications.Tests.csproj
@@ -1,14 +1,9 @@
+
+
- netcoreapp2.2
- latest
- Volo.Abp.Specifications.Tests
- Volo.Abp.Specifications.Tests
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj b/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj
index 1d999ea9d5..90dbb56a8e 100644
--- a/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj
+++ b/framework/test/Volo.Abp.TestApp.Tests/Volo.Abp.TestApp.Tests.csproj
@@ -1,13 +1,9 @@
+
+
- netcoreapp2.2
- Volo.Abp.TestApp.Tests
- Volo.Abp.TestApp.Tests
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj b/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj
index be55d0dc90..d72d42e48a 100644
--- a/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj
+++ b/framework/test/Volo.Abp.TestApp/Volo.Abp.TestApp.csproj
@@ -1,13 +1,9 @@
+
+
- netcoreapp2.2
- Volo.Abp.TestApp
- Volo.Abp.TestApp
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Domain/EntityWithIntPk.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Domain/EntityWithIntPk.cs
new file mode 100644
index 0000000000..040af1a4e9
--- /dev/null
+++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Domain/EntityWithIntPk.cs
@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Volo.Abp.Domain.Entities;
+
+namespace Volo.Abp.TestApp.Domain
+{
+ public class EntityWithIntPk : AggregateRoot
+ {
+ public string Name { get; set; }
+
+ public EntityWithIntPk()
+ {
+
+ }
+
+ public EntityWithIntPk(string name)
+ {
+ Name = name;
+ }
+ }
+}
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 16ac62589e..3bbec118a2 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
@@ -23,8 +23,8 @@ namespace Volo.Abp.TestApp.Domain
}
public Person(Guid id, string name, int age, Guid? tenantId = null, Guid? cityId = null)
+ : base(id)
{
- Id = id;
Name = name;
Age = age;
TenantId = tenantId;
diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Domain/Phone.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Domain/Phone.cs
index e53f2bc2e3..20292e3de8 100644
--- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Domain/Phone.cs
+++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Domain/Phone.cs
@@ -49,8 +49,8 @@ namespace Volo.Abp.TestApp.Domain
}
public Order(Guid id, string referenceNo)
+ : base(id)
{
- Id = id;
ReferenceNo = referenceNo;
OrderLines = new List();
}
diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/TestDataBuilder.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/TestDataBuilder.cs
index 25886f77a6..1f955b3e82 100644
--- a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/TestDataBuilder.cs
+++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/TestDataBuilder.cs
@@ -17,19 +17,23 @@ namespace Volo.Abp.TestApp
private readonly IBasicRepository _personRepository;
private readonly ICityRepository _cityRepository;
+ private readonly IRepository _entityWithIntPksRepository;
public TestDataBuilder(
IBasicRepository personRepository,
- ICityRepository cityRepository)
+ ICityRepository cityRepository,
+ IRepository entityWithIntPksRepository)
{
_personRepository = personRepository;
_cityRepository = cityRepository;
+ _entityWithIntPksRepository = entityWithIntPksRepository;
}
public void Build()
{
AddCities();
AddPeople();
+ AddEntitiesWithPks();
}
private void AddCities()
@@ -63,5 +67,10 @@ namespace Volo.Abp.TestApp
_personRepository.Insert(tenant1Person1);
_personRepository.Insert(tenant1Person2);
}
+
+ private void AddEntitiesWithPks()
+ {
+ _entityWithIntPksRepository.Insert(new EntityWithIntPk("Entity1"));
+ }
}
}
\ No newline at end of file
diff --git a/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Repository_Basic_Tests_With_Int_Pk.cs b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Repository_Basic_Tests_With_Int_Pk.cs
new file mode 100644
index 0000000000..f8a2f4e8e9
--- /dev/null
+++ b/framework/test/Volo.Abp.TestApp/Volo/Abp/TestApp/Testing/Repository_Basic_Tests_With_Int_Pk.cs
@@ -0,0 +1,42 @@
+using System.Linq;
+using Shouldly;
+using Volo.Abp.Domain.Repositories;
+using Volo.Abp.Modularity;
+using Volo.Abp.TestApp.Domain;
+using Xunit;
+
+namespace Volo.Abp.TestApp.Testing
+{
+ public abstract class Repository_Basic_Tests_With_Int_Pk : TestAppTestBase
+ where TStartupModule : IAbpModule
+ {
+ protected readonly IRepository EntityWithIntPkRepository;
+
+ protected Repository_Basic_Tests_With_Int_Pk()
+ {
+ EntityWithIntPkRepository = GetRequiredService>();
+ }
+
+ [Fact]
+ public virtual void FirstOrDefault()
+ {
+ WithUnitOfWork(() =>
+ {
+ var entity = EntityWithIntPkRepository.FirstOrDefault(e => e.Name == "Entity1");
+ entity.ShouldNotBeNull();
+ entity.Name.ShouldBe("Entity1");
+ });
+ }
+
+ [Fact]
+ public virtual void Get()
+ {
+ WithUnitOfWork(() =>
+ {
+ var entity = EntityWithIntPkRepository.Get(1);
+ entity.ShouldNotBeNull();
+ entity.Name.ShouldBe("Entity1");
+ });
+ }
+ }
+}
diff --git a/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj b/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj
index 9a1f142f01..7937d99580 100644
--- a/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj
+++ b/framework/test/Volo.Abp.UI.Navigation.Tests/Volo.Abp.UI.Navigation.Tests.csproj
@@ -1,13 +1,9 @@
+
+
- netcoreapp2.2
- Volo.Abp.UI.Navigation.Tests
- Volo.Abp.UI.Navigation.Tests
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj b/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj
index dd868b860f..6ec5ddac26 100644
--- a/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj
+++ b/framework/test/Volo.Abp.Uow.Tests/Volo.Abp.Uow.Tests.csproj
@@ -1,14 +1,9 @@
+
+
- netcoreapp2.2
- latest
- Volo.Abp.Uow.Tests
- Volo.Abp.Uow.Tests
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj b/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj
index ea192bb236..b1f30e3ea5 100644
--- a/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj
+++ b/framework/test/Volo.Abp.Validation.Tests/Volo.Abp.Validation.Tests.csproj
@@ -1,13 +1,9 @@
+
+
- netcoreapp2.2
- Volo.Abp.Validation.Tests
- Volo.Abp.Validation.Tests
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj b/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj
index e74d97c437..440525bc9e 100644
--- a/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj
+++ b/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo.Abp.VirtualFileSystem.Tests.csproj
@@ -1,13 +1,9 @@
+
+
- netcoreapp2.2
- Volo.Abp.VirtualFileSystem.Tests
- Volo.Abp.VirtualFileSystem.Tests
- true
- false
- false
- false
+ netcoreapp3.0
diff --git a/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo/Abp/VirtualFileSystem/VirtualFileProvider_Tests.cs b/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo/Abp/VirtualFileSystem/VirtualFileProvider_Tests.cs
index 2c853e3a19..e376d24aa0 100644
--- a/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo/Abp/VirtualFileSystem/VirtualFileProvider_Tests.cs
+++ b/framework/test/Volo.Abp.VirtualFileSystem.Tests/Volo/Abp/VirtualFileSystem/VirtualFileProvider_Tests.cs
@@ -1,4 +1,5 @@
using System.IO;
+using System.Linq;
using System.Text;
using Microsoft.Extensions.DependencyInjection;
using Shouldly;
@@ -32,6 +33,19 @@ namespace Volo.Abp.VirtualFileSystem
}
}
+ [Fact]
+ public void Should_Define_And_Get_Embedded_Directory_Contents()
+ {
+ //Act
+ var contents = _virtualFileProvider.GetDirectoryContents("/js");
+
+ //Assert
+ contents.Exists.ShouldNotBeNull();
+
+ var contentList = contents.ToList();
+ contentList.ShouldContain(x => x.Name == "jquery-3-1-1-min.js");
+ }
+
[DependsOn(typeof(AbpVirtualFileSystemModule))]
public class TestModule : AbpModule
{
diff --git a/modules/account/src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.csproj b/modules/account/src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.csproj
index 14f9c8f991..65c5a1b913 100644
--- a/modules/account/src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.csproj
+++ b/modules/account/src/Volo.Abp.Account.Application/Volo.Abp.Account.Application.csproj
@@ -10,7 +10,7 @@
-
+
diff --git a/modules/account/src/Volo.Abp.Account.HttpApi.Client/Volo.Abp.Account.HttpApi.Client.csproj b/modules/account/src/Volo.Abp.Account.HttpApi.Client/Volo.Abp.Account.HttpApi.Client.csproj
index c5d14ebcc4..9ecb118b9b 100644
--- a/modules/account/src/Volo.Abp.Account.HttpApi.Client/Volo.Abp.Account.HttpApi.Client.csproj
+++ b/modules/account/src/Volo.Abp.Account.HttpApi.Client/Volo.Abp.Account.HttpApi.Client.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.Account.HttpApi.Client
Volo.Abp.Account.HttpApi.Client
diff --git a/modules/account/src/Volo.Abp.Account.HttpApi/Volo.Abp.Account.HttpApi.csproj b/modules/account/src/Volo.Abp.Account.HttpApi/Volo.Abp.Account.HttpApi.csproj
index 798c7e404e..2af9e29df4 100644
--- a/modules/account/src/Volo.Abp.Account.HttpApi/Volo.Abp.Account.HttpApi.csproj
+++ b/modules/account/src/Volo.Abp.Account.HttpApi/Volo.Abp.Account.HttpApi.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.Account.HttpApi
Volo.Abp.Account.HttpApi
diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs
index 666bcfadf0..b6902e86d8 100644
--- a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs
+++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Pages/Account/IdentityServerSupportedLoginModel.cs
@@ -52,15 +52,7 @@ namespace Volo.Abp.Account.Web.Pages.Account
//TODO: Reference AspNetCore MultiTenancy module and use options to get the tenant key!
var tenant = context.Parameters[TenantResolverConsts.DefaultTenantKey];
- if (string.IsNullOrEmpty(tenant))
- {
- if (Request.Cookies.ContainsKey(TenantResolverConsts.DefaultTenantKey))
- {
- CurrentTenant.Change(null);
- Response.Cookies.Delete(TenantResolverConsts.DefaultTenantKey);
- }
- }
- else
+ if (!string.IsNullOrEmpty(tenant))
{
CurrentTenant.Change(Guid.Parse(tenant));
Response.Cookies.Append(TenantResolverConsts.DefaultTenantKey, tenant);
diff --git a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Volo.Abp.Account.Web.IdentityServer.csproj b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Volo.Abp.Account.Web.IdentityServer.csproj
index 724ecc38ef..a03e55b51f 100644
--- a/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Volo.Abp.Account.Web.IdentityServer.csproj
+++ b/modules/account/src/Volo.Abp.Account.Web.IdentityServer/Volo.Abp.Account.Web.IdentityServer.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.Account.Web.IdentityServer
Volo.Abp.Account.Web.IdentityServer
true
@@ -16,10 +16,9 @@
-
-
-
-
+
+
+
diff --git a/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/AccountController.cs b/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/AccountController.cs
index 700d52b3a9..8a5b54ecf1 100644
--- a/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/AccountController.cs
+++ b/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/AccountController.cs
@@ -1,5 +1,4 @@
using System;
-using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
@@ -8,6 +7,7 @@ using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.Identity;
using SignInResult = Microsoft.AspNetCore.Identity.SignInResult;
using UserLoginInfo = Volo.Abp.Account.Web.Areas.Account.Controllers.Models.UserLoginInfo;
+using IdentityUser = Volo.Abp.Identity.IdentityUser;
namespace Volo.Abp.Account.Web.Areas.Account.Controllers
{
diff --git a/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/LogoutController.cs b/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/LogoutController.cs
index 5a5f517851..1f1b43b853 100644
--- a/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/LogoutController.cs
+++ b/modules/account/src/Volo.Abp.Account.Web/Areas/Account/Controllers/LogoutController.cs
@@ -2,7 +2,7 @@
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
-using Volo.Abp.Identity;
+using IdentityUser = Volo.Abp.Identity.IdentityUser;
namespace Volo.Abp.Account.Web.Areas.Account.Controllers
{
diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccountPageModel.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccountPageModel.cs
index 4a2751f21b..c1c1880650 100644
--- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccountPageModel.cs
+++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/AccountPageModel.cs
@@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Account.Localization;
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
using Volo.Abp.Identity;
+using IdentityUser = Volo.Abp.Identity.IdentityUser;
namespace Volo.Abp.Account.Web.Pages.Account
{
diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs
index aa168344a5..cc82de414f 100644
--- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs
+++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Login.cshtml.cs
@@ -14,6 +14,7 @@ using Volo.Abp.Identity;
using Volo.Abp.Security.Claims;
using Volo.Abp.Uow;
using Volo.Abp.Validation;
+using IdentityUser = Volo.Abp.Identity.IdentityUser;
namespace Volo.Abp.Account.Web.Pages.Account
{
diff --git a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs
index d5ffdefd88..1a16cecc2a 100644
--- a/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs
+++ b/modules/account/src/Volo.Abp.Account.Web/Pages/Account/Register.cshtml.cs
@@ -1,14 +1,11 @@
-using System;
-using System.ComponentModel;
-using System.ComponentModel.DataAnnotations;
+using System.ComponentModel.DataAnnotations;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.Account.Web.Settings;
-using Volo.Abp.Identity;
using Volo.Abp.Settings;
-using Volo.Abp.UI;
using Volo.Abp.Uow;
+using IdentityUser = Volo.Abp.Identity.IdentityUser;
namespace Volo.Abp.Account.Web.Pages.Account
{
diff --git a/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj b/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj
index f06fb190ed..3101861d54 100644
--- a/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj
+++ b/modules/account/src/Volo.Abp.Account.Web/Volo.Abp.Account.Web.csproj
@@ -3,26 +3,31 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.Account.Web
Volo.Abp.Account.Web
- true
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
false
false
false
Volo.Abp.Account.Web
+ true
Library
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/account/test/Volo.Abp.Account.Application.Tests/Volo.Abp.Account.Application.Tests.csproj b/modules/account/test/Volo.Abp.Account.Application.Tests/Volo.Abp.Account.Application.Tests.csproj
index 5fa709490c..d7153fa75f 100644
--- a/modules/account/test/Volo.Abp.Account.Application.Tests/Volo.Abp.Account.Application.Tests.csproj
+++ b/modules/account/test/Volo.Abp.Account.Application.Tests/Volo.Abp.Account.Application.Tests.csproj
@@ -1,11 +1,11 @@
- netcoreapp2.2
+ netcoreapp3.0
-
+
diff --git a/modules/account/test/Volo.Abp.Account.Application.Tests/Volo/Abp/Account/AccountAppService_Tests.cs b/modules/account/test/Volo.Abp.Account.Application.Tests/Volo/Abp/Account/AccountAppService_Tests.cs
index a2dec7ddff..634cbfc253 100644
--- a/modules/account/test/Volo.Abp.Account.Application.Tests/Volo/Abp/Account/AccountAppService_Tests.cs
+++ b/modules/account/test/Volo.Abp.Account.Application.Tests/Volo/Abp/Account/AccountAppService_Tests.cs
@@ -25,7 +25,7 @@ namespace Volo.Abp.Account.Pro.Application.Tests.Volo.Abp.Account
[Fact]
public async Task RegisterAsync()
{
- var registerDto = new RegisterDto()
+ var registerDto = new RegisterDto
{
UserName = "bob.lee",
EmailAddress = "bob.lee@abp.io",
@@ -36,7 +36,7 @@ namespace Volo.Abp.Account.Pro.Application.Tests.Volo.Abp.Account
await _accountAppService.RegisterAsync(registerDto);
var user = await _identityUserRepository.FindByNormalizedUserNameAsync(
- _lookupNormalizer.Normalize("bob.lee"));
+ _lookupNormalizer.NormalizeName("bob.lee"));
user.ShouldNotBeNull();
user.UserName.ShouldBe("bob.lee");
diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/IAuditLogRepository.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/IAuditLogRepository.cs
index e94eee3d88..1da98f36aa 100644
--- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/IAuditLogRepository.cs
+++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/IAuditLogRepository.cs
@@ -13,6 +13,8 @@ namespace Volo.Abp.AuditLogging
string sorting = null,
int maxResultCount = 50,
int skipCount = 0,
+ DateTime? startTime = null,
+ DateTime? endTime = null,
string httpMethod = null,
string url = null,
string userName = null,
@@ -26,6 +28,8 @@ namespace Volo.Abp.AuditLogging
CancellationToken cancellationToken = default);
Task GetCountAsync(
+ DateTime? startTime = null,
+ DateTime? endTime = null,
string httpMethod = null,
string url = null,
string userName = null,
diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo.Abp.AuditLogging.EntityFrameworkCore.csproj b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo.Abp.AuditLogging.EntityFrameworkCore.csproj
index ff72eb23da..93422d8f3f 100644
--- a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo.Abp.AuditLogging.EntityFrameworkCore.csproj
+++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo.Abp.AuditLogging.EntityFrameworkCore.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netstandard2.1
diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/EfCoreAuditLogRepository.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/EfCoreAuditLogRepository.cs
index 043c3d8988..c60dfcc4d7 100644
--- a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/EfCoreAuditLogRepository.cs
+++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/EfCoreAuditLogRepository.cs
@@ -23,6 +23,8 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore
string sorting = null,
int maxResultCount = 50,
int skipCount = 0,
+ DateTime? startTime = null,
+ DateTime? endTime = null,
string httpMethod = null,
string url = null,
string userName = null,
@@ -35,16 +37,31 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore
bool includeDetails = false,
CancellationToken cancellationToken = default)
{
- var query = GetListQuery(httpMethod, url, userName, applicationName, correlationId, maxExecutionDuration, minExecutionDuration, hasException, httpStatusCode, includeDetails);
+ var query = GetListQuery(
+ startTime,
+ endTime,
+ httpMethod,
+ url,
+ userName,
+ applicationName,
+ correlationId,
+ maxExecutionDuration,
+ minExecutionDuration,
+ hasException,
+ httpStatusCode,
+ includeDetails
+ );
var auditLogs = await query.OrderBy(sorting ?? "executionTime desc")
.PageBy(skipCount, maxResultCount)
- .ToListAsync();
+ .ToListAsync(GetCancellationToken(cancellationToken));
return auditLogs;
}
public async Task GetCountAsync(
+ DateTime? startTime = null,
+ DateTime? endTime = null,
string httpMethod = null,
string url = null,
string userName = null,
@@ -56,14 +73,28 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore
HttpStatusCode? httpStatusCode = null,
CancellationToken cancellationToken = default)
{
- var query = GetListQuery(httpMethod, url, userName, applicationName, correlationId, maxExecutionDuration, minExecutionDuration, hasException, httpStatusCode);
+ var query = GetListQuery(
+ startTime,
+ endTime,
+ httpMethod,
+ url,
+ userName,
+ applicationName,
+ correlationId,
+ maxExecutionDuration,
+ minExecutionDuration,
+ hasException,
+ httpStatusCode
+ );
- var totalCount = await query.LongCountAsync();
+ var totalCount = await query.LongCountAsync(GetCancellationToken(cancellationToken));
return totalCount;
}
private IQueryable GetListQuery(
+ DateTime? startTime = null,
+ DateTime? endTime = null,
string httpMethod = null,
string url = null,
string userName = null,
@@ -77,16 +108,18 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore
{
return DbSet.AsNoTracking()
.IncludeDetails(includeDetails)
- .WhereIf(hasException.HasValue && hasException.Value, auditLog => auditLog.Exceptions != null && auditLog.Exceptions.Length > 0)
- .WhereIf(hasException.HasValue && !hasException.Value, auditLog => auditLog.Exceptions == null || auditLog.Exceptions.Length == 0)
- .WhereIf(httpMethod != null, auditLog => auditLog.HttpMethod != null && auditLog.HttpMethod.ToLowerInvariant() == httpMethod.ToLowerInvariant())
- .WhereIf(url != null, auditLog => auditLog.Url != null && auditLog.Url.ToLowerInvariant().Contains(url.ToLowerInvariant()))
- .WhereIf(userName != null, auditLog => auditLog.UserName != null && auditLog.UserName.ToLowerInvariant() == userName.ToLowerInvariant())
- .WhereIf(applicationName != null, auditLog => auditLog.ApplicationName != null && auditLog.ApplicationName.ToLowerInvariant() == applicationName.ToLowerInvariant())
- .WhereIf(correlationId != null, auditLog => auditLog.CorrelationId != null && auditLog.CorrelationId.ToLowerInvariant() == correlationId.ToLowerInvariant())
+ .WhereIf(startTime.HasValue, auditLog => auditLog.ExecutionTime >= startTime)
+ .WhereIf(endTime.HasValue, auditLog => auditLog.ExecutionTime <= endTime)
+ .WhereIf(hasException.HasValue && hasException.Value, auditLog => auditLog.Exceptions != null)
+ .WhereIf(hasException.HasValue && !hasException.Value, auditLog => auditLog.Exceptions == null)
+ .WhereIf(httpMethod != null, auditLog => auditLog.HttpMethod == httpMethod)
+ .WhereIf(url != null, auditLog => auditLog.Url != null && auditLog.Url.Contains(url))
+ .WhereIf(userName != null, auditLog => auditLog.UserName == userName)
+ .WhereIf(applicationName != null, auditLog => auditLog.ApplicationName == applicationName)
+ .WhereIf(correlationId != null, auditLog => auditLog.CorrelationId == correlationId)
.WhereIf(httpStatusCode != null && httpStatusCode > 0, auditLog => auditLog.HttpStatusCode == (int?)httpStatusCode)
- .WhereIf(maxExecutionDuration != null && maxExecutionDuration > 0, auditLog => auditLog.ExecutionDuration <= maxExecutionDuration)
- .WhereIf(minExecutionDuration != null && minExecutionDuration > 0, auditLog => auditLog.ExecutionDuration >= minExecutionDuration);
+ .WhereIf(maxExecutionDuration != null && maxExecutionDuration.Value > 0, auditLog => auditLog.ExecutionDuration <= maxExecutionDuration)
+ .WhereIf(minExecutionDuration != null && minExecutionDuration.Value > 0, auditLog => auditLog.ExecutionDuration >= minExecutionDuration);
}
public override IQueryable WithDetails()
diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/MongoAuditLogRepository.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/MongoAuditLogRepository.cs
index f70bd1deaf..cead3fa2a9 100644
--- a/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/MongoAuditLogRepository.cs
+++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/MongoAuditLogRepository.cs
@@ -24,6 +24,8 @@ namespace Volo.Abp.AuditLogging.MongoDB
string sorting = null,
int maxResultCount = 50,
int skipCount = 0,
+ DateTime? startTime = null,
+ DateTime? endTime = null,
string httpMethod = null,
string url = null,
string userName = null,
@@ -36,14 +38,29 @@ namespace Volo.Abp.AuditLogging.MongoDB
bool includeDetails = false,
CancellationToken cancellationToken = default)
{
- var query = GetListQuery(httpMethod, url, userName, applicationName, correlationId, maxDuration, minDuration, hasException, httpStatusCode, includeDetails);
+ var query = GetListQuery(
+ startTime,
+ endTime,
+ httpMethod,
+ url,
+ userName,
+ applicationName,
+ correlationId,
+ maxDuration,
+ minDuration,
+ hasException,
+ httpStatusCode,
+ includeDetails
+ );
return await query.OrderBy(sorting ?? "executionTime desc").As>()
.PageBy>(skipCount, maxResultCount)
- .ToListAsync();
+ .ToListAsync(GetCancellationToken(cancellationToken));
}
public async Task GetCountAsync(
+ DateTime? startTime = null,
+ DateTime? endTime = null,
string httpMethod = null,
string url = null,
string userName = null,
@@ -55,14 +72,29 @@ namespace Volo.Abp.AuditLogging.MongoDB
HttpStatusCode? httpStatusCode = null,
CancellationToken cancellationToken = default)
{
- var query = GetListQuery(httpMethod, url, userName, applicationName, correlationId, maxDuration, minDuration, hasException, httpStatusCode);
+ var query = GetListQuery(
+ startTime,
+ endTime,
+ httpMethod,
+ url,
+ userName,
+ applicationName,
+ correlationId,
+ maxDuration,
+ minDuration,
+ hasException,
+ httpStatusCode
+ );
- var count = await query.As>().LongCountAsync();
+ var count = await query.As>()
+ .LongCountAsync(GetCancellationToken(cancellationToken));
return count;
}
private IQueryable GetListQuery(
+ DateTime? startTime = null,
+ DateTime? endTime = null,
string httpMethod = null,
string url = null,
string userName = null,
@@ -75,13 +107,15 @@ namespace Volo.Abp.AuditLogging.MongoDB
bool includeDetails = false)
{
return GetMongoQueryable()
- .WhereIf(hasException.HasValue && hasException.Value, auditLog => auditLog.Exceptions != null && auditLog.Exceptions.Length > 0)
- .WhereIf(hasException.HasValue && !hasException.Value, auditLog => auditLog.Exceptions == null || auditLog.Exceptions.Length == 0)
- .WhereIf(httpMethod != null, auditLog => auditLog.HttpMethod != null && auditLog.HttpMethod.ToLowerInvariant() == httpMethod.ToLowerInvariant())
- .WhereIf(url != null, auditLog => auditLog.Url != null && auditLog.Url.ToLowerInvariant().Contains(url.ToLowerInvariant()))
- .WhereIf(userName != null, auditLog => auditLog.UserName != null && auditLog.UserName.ToLowerInvariant() == userName.ToLowerInvariant())
- .WhereIf(applicationName != null, auditLog => auditLog.ApplicationName != null && auditLog.ApplicationName.ToLowerInvariant() == applicationName.ToLowerInvariant())
- .WhereIf(correlationId != null, auditLog => auditLog.CorrelationId != null && auditLog.CorrelationId.ToLowerInvariant() == correlationId.ToLowerInvariant())
+ .WhereIf(startTime.HasValue, auditLog => auditLog.ExecutionTime >= startTime)
+ .WhereIf(endTime.HasValue, auditLog => auditLog.ExecutionTime <= endTime)
+ .WhereIf(hasException.HasValue && hasException.Value, auditLog => auditLog.Exceptions != null)
+ .WhereIf(hasException.HasValue && !hasException.Value, auditLog => auditLog.Exceptions == null)
+ .WhereIf(httpMethod != null, auditLog => auditLog.HttpMethod == httpMethod)
+ .WhereIf(url != null, auditLog => auditLog.Url != null && auditLog.Url.Contains(url))
+ .WhereIf(userName != null, auditLog => auditLog.UserName == userName)
+ .WhereIf(applicationName != null, auditLog => auditLog.ApplicationName == applicationName)
+ .WhereIf(correlationId != null, auditLog => auditLog.CorrelationId == correlationId)
.WhereIf(httpStatusCode != null && httpStatusCode > 0, auditLog => auditLog.HttpStatusCode == (int?)httpStatusCode)
.WhereIf(maxDuration != null && maxDuration > 0, auditLog => auditLog.ExecutionDuration <= maxDuration)
.WhereIf(minDuration != null && minDuration > 0, auditLog => auditLog.ExecutionDuration >= minDuration);
diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests.csproj b/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests.csproj
index 32ee40e070..2a877ba222 100644
--- a/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests.csproj
+++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests/Volo.Abp.AuditLogging.EntityFrameworkCore.Tests.csproj
@@ -3,7 +3,7 @@
- netcoreapp2.2
+ netcoreapp3.0
@@ -13,9 +13,9 @@
-
-
-
+
+
+
diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo.Abp.AuditLogging.MongoDB.Tests.csproj b/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo.Abp.AuditLogging.MongoDB.Tests.csproj
index 9c831556a4..7126bf3cef 100644
--- a/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo.Abp.AuditLogging.MongoDB.Tests.csproj
+++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.MongoDB.Tests/Volo.Abp.AuditLogging.MongoDB.Tests.csproj
@@ -3,7 +3,7 @@
- netcoreapp2.2
+ netcoreapp3.0
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo.Abp.AuditLogging.TestBase.csproj b/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo.Abp.AuditLogging.TestBase.csproj
index 7d817c4f6d..e7d0174cc9 100644
--- a/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo.Abp.AuditLogging.TestBase.csproj
+++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.TestBase/Volo.Abp.AuditLogging.TestBase.csproj
@@ -3,7 +3,7 @@
- netcoreapp2.2
+ netcoreapp3.0
@@ -14,7 +14,7 @@
-
+
diff --git a/modules/audit-logging/test/Volo.Abp.AuditLogging.Tests/Volo.Abp.AuditLogging.Tests.csproj b/modules/audit-logging/test/Volo.Abp.AuditLogging.Tests/Volo.Abp.AuditLogging.Tests.csproj
index 31c5d2886c..7dadd76798 100644
--- a/modules/audit-logging/test/Volo.Abp.AuditLogging.Tests/Volo.Abp.AuditLogging.Tests.csproj
+++ b/modules/audit-logging/test/Volo.Abp.AuditLogging.Tests/Volo.Abp.AuditLogging.Tests.csproj
@@ -3,7 +3,7 @@
- netcoreapp2.2
+ netcoreapp3.0
@@ -12,7 +12,7 @@
-
+
diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/DemoAppHangfireModule.cs b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/DemoAppHangfireModule.cs
index 27809f3d5c..1afe3f594c 100644
--- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/DemoAppHangfireModule.cs
+++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/DemoAppHangfireModule.cs
@@ -29,10 +29,11 @@ namespace Volo.Abp.BackgroundJobs.DemoApp.HangFire
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
- context
- .ServiceProvider
- .GetRequiredService()
- .AddConsole(LogLevel.Debug);
+ //TODO: Configure console logging
+ //context
+ // .ServiceProvider
+ // .GetRequiredService()
+ // .AddConsole(LogLevel.Debug);
}
}
}
diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/Volo.Abp.BackgroundJobs.DemoApp.HangFire.csproj b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/Volo.Abp.BackgroundJobs.DemoApp.HangFire.csproj
index c629101316..0eba9eeec3 100644
--- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/Volo.Abp.BackgroundJobs.DemoApp.HangFire.csproj
+++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.HangFire/Volo.Abp.BackgroundJobs.DemoApp.HangFire.csproj
@@ -2,7 +2,7 @@
Exe
- netcoreapp2.2
+ netcoreapp3.0
diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/DemoAppRabbitMqModule.cs b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/DemoAppRabbitMqModule.cs
index 6b1071716b..416bb29a96 100644
--- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/DemoAppRabbitMqModule.cs
+++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/DemoAppRabbitMqModule.cs
@@ -16,10 +16,11 @@ namespace Volo.Abp.BackgroundJobs.DemoApp.RabbitMq
{
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
- context
- .ServiceProvider
- .GetRequiredService()
- .AddConsole(LogLevel.Debug);
+ //TODO: Configure console logging
+ //context
+ // .ServiceProvider
+ // .GetRequiredService()
+ // .AddConsole(LogLevel.Debug);
}
}
}
diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq.csproj b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq.csproj
index 46b7ff0ce5..00d239bef2 100644
--- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq.csproj
+++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq/Volo.Abp.BackgroundJobs.DemoApp.RabbitMq.csproj
@@ -2,7 +2,7 @@
Exe
- netcoreapp2.2
+ netcoreapp3.0
diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Volo.Abp.BackgroundJobs.DemoApp.Shared.csproj b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Volo.Abp.BackgroundJobs.DemoApp.Shared.csproj
index 1d7fc9fe56..1c95d86610 100644
--- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Volo.Abp.BackgroundJobs.DemoApp.Shared.csproj
+++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp.Shared/Volo.Abp.BackgroundJobs.DemoApp.Shared.csproj
@@ -5,7 +5,7 @@
-
+
diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/DemoAppModule.cs b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/DemoAppModule.cs
index 69cfb2aa6f..cb9b532525 100644
--- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/DemoAppModule.cs
+++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/DemoAppModule.cs
@@ -38,10 +38,11 @@ namespace Volo.Abp.BackgroundJobs.DemoApp
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
- context
- .ServiceProvider
- .GetRequiredService()
- .AddConsole(LogLevel.Debug);
+ //TODO: Configure console logging
+ //context
+ // .ServiceProvider
+ // .GetRequiredService()
+ // .AddConsole(LogLevel.Debug);
}
}
}
diff --git a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj
index 3540aa8e9c..72dc208dc2 100644
--- a/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj
+++ b/modules/background-jobs/app/Volo.Abp.BackgroundJobs.DemoApp/Volo.Abp.BackgroundJobs.DemoApp.csproj
@@ -2,7 +2,7 @@
Exe
- netcoreapp2.2
+ netcoreapp3.0
@@ -11,8 +11,8 @@
runtime; build; native; contentfiles; analyzers; buildtransitive
-
+
diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobRecord.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobRecord.cs
index c3684d9cfe..76106ea468 100644
--- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobRecord.cs
+++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobRecord.cs
@@ -48,7 +48,13 @@ namespace Volo.Abp.BackgroundJobs
///
public virtual BackgroundJobPriority Priority { get; set; }
- public BackgroundJobRecord()
+ private BackgroundJobRecord()
+ {
+
+ }
+
+ public BackgroundJobRecord(Guid id)
+ : base(id)
{
}
diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobsDomainAutoMapperProfile.cs b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobsDomainAutoMapperProfile.cs
index a20a01392b..ebf98bbe70 100644
--- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobsDomainAutoMapperProfile.cs
+++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.Domain/Volo/Abp/BackgroundJobs/BackgroundJobsDomainAutoMapperProfile.cs
@@ -8,9 +8,11 @@ namespace Volo.Abp.BackgroundJobs
public BackgroundJobsDomainAutoMapperProfile()
{
CreateMap()
+ .ConstructUsing(x => new BackgroundJobRecord(x.Id))
.Ignore(record => record.ConcurrencyStamp)
- .Ignore(record => record.ExtraProperties)
- .ReverseMap();
+ .Ignore(record => record.ExtraProperties);
+
+ CreateMap();
}
}
}
diff --git a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo.Abp.BackgroundJobs.EntityFrameworkCore.csproj b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo.Abp.BackgroundJobs.EntityFrameworkCore.csproj
index 1b3ed12524..eb92972675 100644
--- a/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo.Abp.BackgroundJobs.EntityFrameworkCore.csproj
+++ b/modules/background-jobs/src/Volo.Abp.BackgroundJobs.EntityFrameworkCore/Volo.Abp.BackgroundJobs.EntityFrameworkCore.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netstandard2.1
diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo.Abp.BackgroundJobs.Domain.Tests.csproj b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo.Abp.BackgroundJobs.Domain.Tests.csproj
index 66ef602232..7932f919e1 100644
--- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo.Abp.BackgroundJobs.Domain.Tests.csproj
+++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo.Abp.BackgroundJobs.Domain.Tests.csproj
@@ -3,7 +3,7 @@
- netcoreapp2.2
+ netcoreapp3.0
@@ -12,7 +12,7 @@
-
+
diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo/Abp/BackgroundJobs/BackgroundJobStore_Tests.cs b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo/Abp/BackgroundJobs/BackgroundJobStore_Tests.cs
new file mode 100644
index 0000000000..caa9a3c445
--- /dev/null
+++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.Domain.Tests/Volo/Abp/BackgroundJobs/BackgroundJobStore_Tests.cs
@@ -0,0 +1,38 @@
+using System;
+using System.Threading.Tasks;
+using Shouldly;
+using Xunit;
+
+namespace Volo.Abp.BackgroundJobs
+{
+ public class BackgroundJobStore_Tests : BackgroundJobsDomainTestBase
+ {
+ private readonly IBackgroundJobStore _backgroundJobStore;
+
+ public BackgroundJobStore_Tests()
+ {
+ _backgroundJobStore = GetRequiredService();
+ }
+
+ [Fact]
+ public async Task InsertAsync()
+ {
+ var jobInfo = new BackgroundJobInfo
+ {
+ Id = Guid.NewGuid(),
+ JobArgs = "args1",
+ JobName = "name1"
+ };
+
+ await _backgroundJobStore.InsertAsync(
+ jobInfo
+ );
+
+ var jobInfo2 = await _backgroundJobStore.FindAsync(jobInfo.Id);
+ jobInfo2.ShouldNotBeNull();
+ jobInfo2.Id.ShouldBe(jobInfo.Id);
+ jobInfo2.JobArgs.ShouldBe(jobInfo.JobArgs);
+ jobInfo2.JobName.ShouldBe(jobInfo.JobName);
+ }
+ }
+}
diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests.csproj b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests.csproj
index 7fd7558b02..b0a58d8f6d 100644
--- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests.csproj
+++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests/Volo.Abp.BackgroundJobs.EntityFrameworkCore.Tests.csproj
@@ -3,7 +3,7 @@
- netcoreapp2.2
+ netcoreapp3.0
@@ -13,10 +13,10 @@
-
-
-
-
+
+
+
+
diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj
index e999356678..468c1f0665 100644
--- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj
+++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.MongoDB.Tests/Volo.Abp.BackgroundJobs.MongoDB.Tests.csproj
@@ -3,7 +3,7 @@
- netcoreapp2.2
+ netcoreapp3.0
@@ -13,7 +13,7 @@
-
+
diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo.Abp.BackgroundJobs.TestBase.csproj b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo.Abp.BackgroundJobs.TestBase.csproj
index ce6e3b7c1b..d6dbe4bb8e 100644
--- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo.Abp.BackgroundJobs.TestBase.csproj
+++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo.Abp.BackgroundJobs.TestBase.csproj
@@ -3,7 +3,7 @@
- netcoreapp2.2
+ netcoreapp3.0
@@ -14,7 +14,7 @@
-
+
diff --git a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/BackgroundJobsTestDataBuilder.cs b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/BackgroundJobsTestDataBuilder.cs
index 347db003a2..dd74854a9c 100644
--- a/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/BackgroundJobsTestDataBuilder.cs
+++ b/modules/background-jobs/test/Volo.Abp.BackgroundJobs.TestBase/Volo/Abp/BackgroundJobs/BackgroundJobsTestDataBuilder.cs
@@ -23,9 +23,8 @@ namespace Volo.Abp.BackgroundJobs
public void Build()
{
_backgroundJobRepository.Insert(
- new BackgroundJobRecord
+ new BackgroundJobRecord(_testData.JobId1)
{
- Id = _testData.JobId1,
JobName = "TestJobName",
JobArgs = "{ value: 1 }",
NextTryTime = _clock.Now.Subtract(TimeSpan.FromMinutes(1)),
@@ -38,9 +37,8 @@ namespace Volo.Abp.BackgroundJobs
);
_backgroundJobRepository.Insert(
- new BackgroundJobRecord
+ new BackgroundJobRecord(_testData.JobId2)
{
- Id = _testData.JobId2,
JobName = "TestJobName",
JobArgs = "{ value: 2 }",
NextTryTime = _clock.Now.AddMinutes(42),
@@ -53,9 +51,8 @@ namespace Volo.Abp.BackgroundJobs
);
_backgroundJobRepository.Insert(
- new BackgroundJobRecord
+ new BackgroundJobRecord(_testData.JobId3)
{
- Id = _testData.JobId3,
JobName = "TestJobName",
JobArgs = "{ value: 3 }",
NextTryTime = _clock.Now,
diff --git a/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Volo.BloggingTestApp.EntityFrameworkCore.csproj b/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Volo.BloggingTestApp.EntityFrameworkCore.csproj
index e658a6a7ec..27fa209d2c 100644
--- a/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Volo.BloggingTestApp.EntityFrameworkCore.csproj
+++ b/modules/blogging/app/Volo.BloggingTestApp.EntityFrameworkCore/Volo.BloggingTestApp.EntityFrameworkCore.csproj
@@ -1,13 +1,9 @@
- netstandard2.0
+ netstandard2.1
-
-
-
-
diff --git a/modules/blogging/app/Volo.BloggingTestApp.MongoDB/Volo.BloggingTestApp.MongoDB.csproj b/modules/blogging/app/Volo.BloggingTestApp.MongoDB/Volo.BloggingTestApp.MongoDB.csproj
index 1192eda1c2..0f21d360e4 100644
--- a/modules/blogging/app/Volo.BloggingTestApp.MongoDB/Volo.BloggingTestApp.MongoDB.csproj
+++ b/modules/blogging/app/Volo.BloggingTestApp.MongoDB/Volo.BloggingTestApp.MongoDB.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netstandard2.0
diff --git a/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs b/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs
index c42ec7eedc..7a7ecc9046 100644
--- a/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs
+++ b/modules/blogging/app/Volo.BloggingTestApp/BloggingTestAppModule.cs
@@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Localization;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
+using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Options;
using Swashbuckle.AspNetCore.Swagger;
using Volo.Abp;
@@ -144,26 +145,19 @@ namespace Volo.BloggingTestApp
app.UseVirtualFiles();
- app.UseSwagger();
- app.UseSwaggerUI(options =>
- {
- options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support APP API");
- });
+ app.UseRouting();
+
+ //app.UseSwagger();
+ //app.UseSwaggerUI(options =>
+ //{
+ // options.SwaggerEndpoint("/swagger/v1/swagger.json", "Support APP API");
+ //});
app.UseAuthentication();
app.UseRequestLocalization(app.ApplicationServices.GetRequiredService>().Value);
- app.UseMvc(routes =>
- {
- routes.MapRoute(
- name: "defaultWithArea",
- template: "{area}/{controller=Home}/{action=Index}/{id?}");
-
- routes.MapRoute(
- name: "default",
- template: "{controller=Home}/{action=Index}/{id?}");
- });
+ app.UseMvcWithDefaultRouteAndArea();
using (var scope = context.ServiceProvider.CreateScope())
diff --git a/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj b/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj
index deffaccf44..a0df8b49dc 100644
--- a/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj
+++ b/modules/blogging/app/Volo.BloggingTestApp/Volo.BloggingTestApp.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.0
InProcess
@@ -13,11 +13,6 @@
-
-
-
-
-
diff --git a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo.Blogging.Domain.Shared.csproj b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo.Blogging.Domain.Shared.csproj
index c5a4990831..e466b4dc99 100644
--- a/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo.Blogging.Domain.Shared.csproj
+++ b/modules/blogging/src/Volo.Blogging.Domain.Shared/Volo.Blogging.Domain.Shared.csproj
@@ -11,9 +11,6 @@
-
-
-
diff --git a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo.Blogging.EntityFrameworkCore.csproj b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo.Blogging.EntityFrameworkCore.csproj
index 77f25274f0..122385c76f 100644
--- a/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo.Blogging.EntityFrameworkCore.csproj
+++ b/modules/blogging/src/Volo.Blogging.EntityFrameworkCore/Volo.Blogging.EntityFrameworkCore.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netstandard2.1
Volo.Blogging.EntityFrameworkCore
Volo.Blogging.EntityFrameworkCore
diff --git a/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo.Blogging.HttpApi.Client.csproj b/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo.Blogging.HttpApi.Client.csproj
index a736b41226..550d58bcec 100644
--- a/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo.Blogging.HttpApi.Client.csproj
+++ b/modules/blogging/src/Volo.Blogging.HttpApi.Client/Volo.Blogging.HttpApi.Client.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Blogging.HttpApi.Client
Volo.Blogging.HttpApi.Client
diff --git a/modules/blogging/src/Volo.Blogging.HttpApi/Volo.Blogging.HttpApi.csproj b/modules/blogging/src/Volo.Blogging.HttpApi/Volo.Blogging.HttpApi.csproj
index b9c9f3933b..db90344d09 100644
--- a/modules/blogging/src/Volo.Blogging.HttpApi/Volo.Blogging.HttpApi.csproj
+++ b/modules/blogging/src/Volo.Blogging.HttpApi/Volo.Blogging.HttpApi.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Blogging.HttpApi
Volo.Blogging.HttpApi
diff --git a/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj b/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj
index ada7ce2370..330157fbc9 100644
--- a/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj
+++ b/modules/blogging/src/Volo.Blogging.Web/Volo.Blogging.Web.csproj
@@ -3,13 +3,13 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Blogging.Web
Volo.Blogging.Web
+ 2.8
Library
true
Volo.Blogging
- 2.8
@@ -25,9 +25,6 @@
-
-
-
diff --git a/modules/blogging/test/Volo.Blogging.Application.Tests/Volo.Blogging.Application.Tests.csproj b/modules/blogging/test/Volo.Blogging.Application.Tests/Volo.Blogging.Application.Tests.csproj
index a36f95ac50..c37538838a 100644
--- a/modules/blogging/test/Volo.Blogging.Application.Tests/Volo.Blogging.Application.Tests.csproj
+++ b/modules/blogging/test/Volo.Blogging.Application.Tests/Volo.Blogging.Application.Tests.csproj
@@ -1,14 +1,12 @@
- netcoreapp2.2
- true
- true
+ netcoreapp3.0
-
+
diff --git a/modules/blogging/test/Volo.Blogging.Domain.Tests/Volo.Blogging.Domain.Tests.csproj b/modules/blogging/test/Volo.Blogging.Domain.Tests/Volo.Blogging.Domain.Tests.csproj
index b2911bddee..b74ad2c5b0 100644
--- a/modules/blogging/test/Volo.Blogging.Domain.Tests/Volo.Blogging.Domain.Tests.csproj
+++ b/modules/blogging/test/Volo.Blogging.Domain.Tests/Volo.Blogging.Domain.Tests.csproj
@@ -1,13 +1,12 @@
- netcoreapp2.2
-
- false
+ netcoreapp3.0
+
-
+
diff --git a/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo.Blogging.EntityFrameworkCore.Tests.csproj b/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo.Blogging.EntityFrameworkCore.Tests.csproj
index 8f9b464a46..a95f88ce27 100644
--- a/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo.Blogging.EntityFrameworkCore.Tests.csproj
+++ b/modules/blogging/test/Volo.Blogging.EntityFrameworkCore.Tests/Volo.Blogging.EntityFrameworkCore.Tests.csproj
@@ -1,19 +1,14 @@
- netcoreapp2.2
- true
- true
+ netcoreapp3.0
-
-
-
-
-
-
+
+
+
diff --git a/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo.Blogging.MongoDB.Tests.csproj b/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo.Blogging.MongoDB.Tests.csproj
index 093113db66..dae08a69cc 100644
--- a/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo.Blogging.MongoDB.Tests.csproj
+++ b/modules/blogging/test/Volo.Blogging.MongoDB.Tests/Volo.Blogging.MongoDB.Tests.csproj
@@ -1,17 +1,13 @@
- netcoreapp2.2
-
- false
+ netcoreapp3.0
+
-
-
-
-
-
+
+
diff --git a/modules/blogging/test/Volo.Blogging.TestBase/Volo.Blogging.TestBase.csproj b/modules/blogging/test/Volo.Blogging.TestBase/Volo.Blogging.TestBase.csproj
index fc0e279ae1..96825a0297 100644
--- a/modules/blogging/test/Volo.Blogging.TestBase/Volo.Blogging.TestBase.csproj
+++ b/modules/blogging/test/Volo.Blogging.TestBase/Volo.Blogging.TestBase.csproj
@@ -1,9 +1,7 @@
- netcoreapp2.2
- true
- true
+ netcoreapp3.0
@@ -14,7 +12,7 @@
-
+
diff --git a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/ClientSimulationDemoModule.cs b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/ClientSimulationDemoModule.cs
index 3b494ab4fb..afc29ccb3f 100644
--- a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/ClientSimulationDemoModule.cs
+++ b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/ClientSimulationDemoModule.cs
@@ -1,5 +1,6 @@
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
+using Microsoft.Extensions.Hosting;
using Volo.Abp;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic;
using Volo.Abp.Autofac;
@@ -40,8 +41,8 @@ namespace Volo.ClientSimulation.Demo
}
app.UseVirtualFiles();
-
- app.UseMvcWithDefaultRoute();
+ app.UseRouting();
+ app.UseMvcWithDefaultRouteAndArea();
}
}
}
diff --git a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Volo.ClientSimulation.Demo.csproj b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Volo.ClientSimulation.Demo.csproj
index 65aadd08eb..e3cc5d272b 100644
--- a/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Volo.ClientSimulation.Demo.csproj
+++ b/modules/client-simulation/demo/Volo.ClientSimulation.Demo/Volo.ClientSimulation.Demo.csproj
@@ -3,13 +3,12 @@
- netcoreapp2.2
+ netcoreapp3.0
InProcess
+ true
-
-
diff --git a/modules/client-simulation/src/Volo.ClientSimulation.Web/Volo.ClientSimulation.Web.csproj b/modules/client-simulation/src/Volo.ClientSimulation.Web/Volo.ClientSimulation.Web.csproj
index 2664bf2f49..469f90c078 100644
--- a/modules/client-simulation/src/Volo.ClientSimulation.Web/Volo.ClientSimulation.Web.csproj
+++ b/modules/client-simulation/src/Volo.ClientSimulation.Web/Volo.ClientSimulation.Web.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
Volo.ClientSimulation.Web
Volo.ClientSimulation.Web
Library
@@ -12,19 +12,16 @@
2.8
-
-
-
-
+
-
-
-
-
+
+
+
+
diff --git a/modules/client-simulation/src/Volo.ClientSimulation/Volo.ClientSimulation.csproj b/modules/client-simulation/src/Volo.ClientSimulation/Volo.ClientSimulation.csproj
index eb0a9f9ae2..9b3d62c856 100644
--- a/modules/client-simulation/src/Volo.ClientSimulation/Volo.ClientSimulation.csproj
+++ b/modules/client-simulation/src/Volo.ClientSimulation/Volo.ClientSimulation.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
Volo.ClientSimulation
Volo.ClientSimulation
diff --git a/modules/docs/app/VoloDocs.EntityFrameworkCore/VoloDocs.EntityFrameworkCore.csproj b/modules/docs/app/VoloDocs.EntityFrameworkCore/VoloDocs.EntityFrameworkCore.csproj
index b70794e39b..d7f8b49bae 100644
--- a/modules/docs/app/VoloDocs.EntityFrameworkCore/VoloDocs.EntityFrameworkCore.csproj
+++ b/modules/docs/app/VoloDocs.EntityFrameworkCore/VoloDocs.EntityFrameworkCore.csproj
@@ -1,7 +1,7 @@
- netstandard2.0
+ netstandard2.1
diff --git a/modules/docs/app/VoloDocs.Migrator/VoloDocs.Migrator.csproj b/modules/docs/app/VoloDocs.Migrator/VoloDocs.Migrator.csproj
index 2d828d6735..4627c9b165 100644
--- a/modules/docs/app/VoloDocs.Migrator/VoloDocs.Migrator.csproj
+++ b/modules/docs/app/VoloDocs.Migrator/VoloDocs.Migrator.csproj
@@ -1,8 +1,8 @@
+ netcoreapp3.0
Exe
- netcoreapp2.2
win-x64;linux-x64;osx-x64
diff --git a/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj b/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj
index 2dfb07ec80..fa6ddeaecc 100644
--- a/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj
+++ b/modules/docs/app/VoloDocs.Web/VoloDocs.Web.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.0
InProcess
true
true
@@ -11,10 +11,10 @@
+
-
@@ -39,8 +39,4 @@
-
-
-
-
diff --git a/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs b/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs
index 85738e6ff9..3402f62622 100644
--- a/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs
+++ b/modules/docs/app/VoloDocs.Web/VoloDocsWebModule.cs
@@ -1,6 +1,5 @@
using System.IO;
using Microsoft.AspNetCore.Builder;
-using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.DependencyInjection;
using Swashbuckle.AspNetCore.Swagger;
@@ -30,6 +29,7 @@ using Volo.Docs.Admin;
using Volo.Docs.Localization;
using VoloDocs.EntityFrameworkCore;
using Localization.Resources.AbpUi;
+using Microsoft.Extensions.Hosting;
namespace VoloDocs.Web
{
@@ -103,8 +103,7 @@ namespace VoloDocs.Web
options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName);
});
-
-
+
Configure(options =>
{
options.FileSets.AddEmbedded("VoloDocs.Web");
diff --git a/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo.Docs.Admin.Application.Contracts.csproj b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo.Docs.Admin.Application.Contracts.csproj
index 46a7df4293..2805d03357 100644
--- a/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo.Docs.Admin.Application.Contracts.csproj
+++ b/modules/docs/src/Volo.Docs.Admin.Application.Contracts/Volo.Docs.Admin.Application.Contracts.csproj
@@ -10,13 +10,8 @@
-
-
-
-
-
-
-
+
+
diff --git a/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo.Docs.Admin.HttpApi.Client.csproj b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo.Docs.Admin.HttpApi.Client.csproj
index c76ce2895c..d083eed420 100644
--- a/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo.Docs.Admin.HttpApi.Client.csproj
+++ b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo.Docs.Admin.HttpApi.Client.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Docs.Admin.HttpApi.Client
Volo.Docs.Admin.HttpApi.Client
diff --git a/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo/Docs/Admin/DocsHttpApiClientModule.cs b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo/Docs/Admin/DocsHttpApiClientModule.cs
index 5a2e66e5ca..bcab405f63 100644
--- a/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo/Docs/Admin/DocsHttpApiClientModule.cs
+++ b/modules/docs/src/Volo.Docs.Admin.HttpApi.Client/Volo/Docs/Admin/DocsHttpApiClientModule.cs
@@ -6,6 +6,6 @@ namespace Volo.Docs.Admin
typeof(DocsAdminApplicationContractsModule))]
public class DocsAdminHttpApiClientModule : AbpModule
{
-
+ //TODO: Create client proxies!
}
}
diff --git a/modules/docs/src/Volo.Docs.Admin.HttpApi/Volo.Docs.Admin.HttpApi.csproj b/modules/docs/src/Volo.Docs.Admin.HttpApi/Volo.Docs.Admin.HttpApi.csproj
index cea70211b2..6b45d78d91 100644
--- a/modules/docs/src/Volo.Docs.Admin.HttpApi/Volo.Docs.Admin.HttpApi.csproj
+++ b/modules/docs/src/Volo.Docs.Admin.HttpApi/Volo.Docs.Admin.HttpApi.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Docs.Admin.HttpApi
Volo.Docs.Admin.HttpApi
diff --git a/modules/docs/src/Volo.Docs.Admin.Web/Volo.Docs.Admin.Web.csproj b/modules/docs/src/Volo.Docs.Admin.Web/Volo.Docs.Admin.Web.csproj
index 811c668006..1402fb55ee 100644
--- a/modules/docs/src/Volo.Docs.Admin.Web/Volo.Docs.Admin.Web.csproj
+++ b/modules/docs/src/Volo.Docs.Admin.Web/Volo.Docs.Admin.Web.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Docs.Admin.Web
Volo.Docs.Admin.Web
Library
@@ -21,16 +21,10 @@
-
-
-
-
-
-
@@ -41,14 +35,4 @@
-
-
-
-
-
-
- Edit.cshtml
-
-
-
diff --git a/modules/docs/src/Volo.Docs.Domain/Volo.Docs.Domain.csproj b/modules/docs/src/Volo.Docs.Domain/Volo.Docs.Domain.csproj
index 9ad8e3bff6..6bf9b9ce0e 100644
--- a/modules/docs/src/Volo.Docs.Domain/Volo.Docs.Domain.csproj
+++ b/modules/docs/src/Volo.Docs.Domain/Volo.Docs.Domain.csproj
@@ -11,14 +11,11 @@
-
-
-
-
+
diff --git a/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo.Docs.EntityFrameworkCore.csproj b/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo.Docs.EntityFrameworkCore.csproj
index 1eb5495e93..1111fa62a2 100644
--- a/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo.Docs.EntityFrameworkCore.csproj
+++ b/modules/docs/src/Volo.Docs.EntityFrameworkCore/Volo.Docs.EntityFrameworkCore.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netstandard2.1
Volo.Docs.EntityFrameworkCore
Volo.Docs.EntityFrameworkCore
diff --git a/modules/docs/src/Volo.Docs.HttpApi.Client/Volo.Docs.HttpApi.Client.csproj b/modules/docs/src/Volo.Docs.HttpApi.Client/Volo.Docs.HttpApi.Client.csproj
index f85ecb7928..94b6bdbcad 100644
--- a/modules/docs/src/Volo.Docs.HttpApi.Client/Volo.Docs.HttpApi.Client.csproj
+++ b/modules/docs/src/Volo.Docs.HttpApi.Client/Volo.Docs.HttpApi.Client.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Docs.HttpApi.Client
Volo.Docs.HttpApi.Client
diff --git a/modules/docs/src/Volo.Docs.HttpApi.Client/Volo/Docs/DocsHttpApiClientModule.cs b/modules/docs/src/Volo.Docs.HttpApi.Client/Volo/Docs/DocsHttpApiClientModule.cs
index da16113225..1c208c6195 100644
--- a/modules/docs/src/Volo.Docs.HttpApi.Client/Volo/Docs/DocsHttpApiClientModule.cs
+++ b/modules/docs/src/Volo.Docs.HttpApi.Client/Volo/Docs/DocsHttpApiClientModule.cs
@@ -6,6 +6,6 @@ namespace Volo.Docs
typeof(DocsApplicationContractsModule))]
public class DocsHttpApiClientModule : AbpModule
{
-
+ //TODO: Create client proxies
}
}
diff --git a/modules/docs/src/Volo.Docs.HttpApi/Volo.Docs.HttpApi.csproj b/modules/docs/src/Volo.Docs.HttpApi/Volo.Docs.HttpApi.csproj
index 13d295b421..5990d9751d 100644
--- a/modules/docs/src/Volo.Docs.HttpApi/Volo.Docs.HttpApi.csproj
+++ b/modules/docs/src/Volo.Docs.HttpApi/Volo.Docs.HttpApi.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Docs.HttpApi
Volo.Docs.HttpApi
diff --git a/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.csproj b/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.csproj
index d35cc00db3..f458f5858b 100644
--- a/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.csproj
+++ b/modules/docs/src/Volo.Docs.Web/Volo.Docs.Web.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Docs.Web
Volo.Docs.Web
Library
@@ -28,10 +28,6 @@
-
-
-
-
@@ -44,8 +40,4 @@
-
-
-
-
diff --git a/modules/docs/test/Volo.Docs.Admin.Application.Tests/Volo.Docs.Admin.Application.Tests.csproj b/modules/docs/test/Volo.Docs.Admin.Application.Tests/Volo.Docs.Admin.Application.Tests.csproj
index 390476a38f..467f3014f4 100644
--- a/modules/docs/test/Volo.Docs.Admin.Application.Tests/Volo.Docs.Admin.Application.Tests.csproj
+++ b/modules/docs/test/Volo.Docs.Admin.Application.Tests/Volo.Docs.Admin.Application.Tests.csproj
@@ -1,12 +1,12 @@
- netcoreapp2.2
+ netcoreapp3.0
-
+
diff --git a/modules/docs/test/Volo.Docs.Application.Tests/Volo.Docs.Application.Tests.csproj b/modules/docs/test/Volo.Docs.Application.Tests/Volo.Docs.Application.Tests.csproj
index 87144ccfe9..f29ec82969 100644
--- a/modules/docs/test/Volo.Docs.Application.Tests/Volo.Docs.Application.Tests.csproj
+++ b/modules/docs/test/Volo.Docs.Application.Tests/Volo.Docs.Application.Tests.csproj
@@ -1,12 +1,12 @@
- netcoreapp2.2
+ netcoreapp3.0
-
+
diff --git a/modules/docs/test/Volo.Docs.Domain.Tests/Volo.Docs.Domain.Tests.csproj b/modules/docs/test/Volo.Docs.Domain.Tests/Volo.Docs.Domain.Tests.csproj
index ba1185b397..ecf90bd202 100644
--- a/modules/docs/test/Volo.Docs.Domain.Tests/Volo.Docs.Domain.Tests.csproj
+++ b/modules/docs/test/Volo.Docs.Domain.Tests/Volo.Docs.Domain.Tests.csproj
@@ -1,12 +1,12 @@
- netcoreapp2.2
+ netcoreapp3.0
-
+
diff --git a/modules/docs/test/Volo.Docs.EntityFrameworkCore.Tests/Volo.Docs.EntityFrameworkCore.Tests.csproj b/modules/docs/test/Volo.Docs.EntityFrameworkCore.Tests/Volo.Docs.EntityFrameworkCore.Tests.csproj
index 71a466828b..f9ddadfe9a 100644
--- a/modules/docs/test/Volo.Docs.EntityFrameworkCore.Tests/Volo.Docs.EntityFrameworkCore.Tests.csproj
+++ b/modules/docs/test/Volo.Docs.EntityFrameworkCore.Tests/Volo.Docs.EntityFrameworkCore.Tests.csproj
@@ -1,15 +1,15 @@
- netcoreapp2.2
+ netcoreapp3.0
-
-
-
-
+
+
+
+
diff --git a/modules/docs/test/Volo.Docs.MongoDB.Tests/Volo.Docs.MongoDB.Tests.csproj b/modules/docs/test/Volo.Docs.MongoDB.Tests/Volo.Docs.MongoDB.Tests.csproj
index 1366f0d593..5c174000a7 100644
--- a/modules/docs/test/Volo.Docs.MongoDB.Tests/Volo.Docs.MongoDB.Tests.csproj
+++ b/modules/docs/test/Volo.Docs.MongoDB.Tests/Volo.Docs.MongoDB.Tests.csproj
@@ -1,14 +1,13 @@
- netcoreapp2.2
-
- false
+ netcoreapp3.0
+
-
-
+
+
diff --git a/modules/docs/test/Volo.Docs.TestBase/Volo.Docs.TestBase.csproj b/modules/docs/test/Volo.Docs.TestBase/Volo.Docs.TestBase.csproj
index a92946140a..b8f81507f4 100644
--- a/modules/docs/test/Volo.Docs.TestBase/Volo.Docs.TestBase.csproj
+++ b/modules/docs/test/Volo.Docs.TestBase/Volo.Docs.TestBase.csproj
@@ -1,12 +1,12 @@
- netcoreapp2.2
+ netcoreapp3.0
-
+
diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo.Abp.FeatureManagement.Domain.Shared.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo.Abp.FeatureManagement.Domain.Shared.csproj
index a4405067cf..1772c74748 100644
--- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo.Abp.FeatureManagement.Domain.Shared.csproj
+++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain.Shared/Volo.Abp.FeatureManagement.Domain.Shared.csproj
@@ -9,9 +9,6 @@
-
-
-
diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo.Abp.FeatureManagement.Domain.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo.Abp.FeatureManagement.Domain.csproj
index 9a3ebac4f3..15145798e2 100644
--- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo.Abp.FeatureManagement.Domain.csproj
+++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Domain/Volo.Abp.FeatureManagement.Domain.csproj
@@ -15,9 +15,6 @@
-
-
-
diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo.Abp.FeatureManagement.EntityFrameworkCore.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo.Abp.FeatureManagement.EntityFrameworkCore.csproj
index 776a415939..297d7fcaa4 100644
--- a/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo.Abp.FeatureManagement.EntityFrameworkCore.csproj
+++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.EntityFrameworkCore/Volo.Abp.FeatureManagement.EntityFrameworkCore.csproj
@@ -3,15 +3,12 @@
- netstandard2.0
+ netstandard2.1
-
-
-
diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo.Abp.FeatureManagement.HttpApi.Client.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo.Abp.FeatureManagement.HttpApi.Client.csproj
index a4e1ce7e62..d5cd6e4777 100644
--- a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo.Abp.FeatureManagement.HttpApi.Client.csproj
+++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi.Client/Volo.Abp.FeatureManagement.HttpApi.Client.csproj
@@ -3,15 +3,12 @@
- netstandard2.0
+ netcoreapp3.0
-
-
-
diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo.Abp.FeatureManagement.HttpApi.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo.Abp.FeatureManagement.HttpApi.csproj
index 5b01128a6d..4724d3dae9 100644
--- a/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo.Abp.FeatureManagement.HttpApi.csproj
+++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.HttpApi/Volo.Abp.FeatureManagement.HttpApi.csproj
@@ -3,15 +3,12 @@
- netstandard2.0
+ netcoreapp3.0
-
-
-
diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo.Abp.FeatureManagement.MongoDB.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo.Abp.FeatureManagement.MongoDB.csproj
index 2c03150aa9..5f4d23bf4e 100644
--- a/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo.Abp.FeatureManagement.MongoDB.csproj
+++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.MongoDB/Volo.Abp.FeatureManagement.MongoDB.csproj
@@ -9,9 +9,6 @@
-
-
-
diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/AbpFeatureManagementWebModule.cs b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/AbpFeatureManagementWebModule.cs
index ca7f6f31ea..67a178dfbd 100644
--- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/AbpFeatureManagementWebModule.cs
+++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/AbpFeatureManagementWebModule.cs
@@ -1,12 +1,9 @@
-using Localization.Resources.AbpUi;
-using Microsoft.AspNetCore.Mvc.RazorPages;
+using Microsoft.AspNetCore.Mvc.RazorPages;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc.Localization;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
using Volo.Abp.AutoMapper;
using Volo.Abp.FeatureManagement.Localization;
-using Volo.Abp.Localization;
-using Volo.Abp.Localization.Resources.AbpValidation;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
diff --git a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Volo.Abp.FeatureManagement.Web.csproj b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Volo.Abp.FeatureManagement.Web.csproj
index ccc5f00200..66949c9194 100644
--- a/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Volo.Abp.FeatureManagement.Web.csproj
+++ b/modules/feature-management/src/Volo.Abp.FeatureManagement.Web/Volo.Abp.FeatureManagement.Web.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
true
Library
@@ -22,9 +22,6 @@
-
-
-
diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.Application.Tests/Volo.Abp.FeatureManagement.Application.Tests.csproj b/modules/feature-management/test/Volo.Abp.FeatureManagement.Application.Tests/Volo.Abp.FeatureManagement.Application.Tests.csproj
index 1c41a820e6..f8ba6bca58 100644
--- a/modules/feature-management/test/Volo.Abp.FeatureManagement.Application.Tests/Volo.Abp.FeatureManagement.Application.Tests.csproj
+++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.Application.Tests/Volo.Abp.FeatureManagement.Application.Tests.csproj
@@ -3,7 +3,7 @@
- netcoreapp2.2
+ netcoreapp3.0
@@ -13,7 +13,7 @@
-
+
diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo.Abp.FeatureManagement.Domain.Tests.csproj b/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo.Abp.FeatureManagement.Domain.Tests.csproj
index 242262f35e..b7ab166f0f 100644
--- a/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo.Abp.FeatureManagement.Domain.Tests.csproj
+++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.Domain.Tests/Volo.Abp.FeatureManagement.Domain.Tests.csproj
@@ -3,15 +3,12 @@
- netcoreapp2.2
+ netcoreapp3.0
-
-
-
-
+
diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests.csproj b/modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests.csproj
index 5566f756d8..98c3df4df9 100644
--- a/modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests.csproj
+++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests/Volo.Abp.FeatureManagement.EntityFrameworkCore.Tests.csproj
@@ -3,7 +3,7 @@
- netcoreapp2.2
+ netcoreapp3.0
@@ -13,10 +13,10 @@
-
-
-
-
+
+
+
+
diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo.Abp.FeatureManagement.MongoDB.Tests.csproj b/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo.Abp.FeatureManagement.MongoDB.Tests.csproj
index 8bed0f0aa9..4006abf8f7 100644
--- a/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo.Abp.FeatureManagement.MongoDB.Tests.csproj
+++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.MongoDB.Tests/Volo.Abp.FeatureManagement.MongoDB.Tests.csproj
@@ -3,7 +3,7 @@
- netcoreapp2.2
+ netcoreapp3.0
@@ -13,8 +13,8 @@
-
-
+
+
diff --git a/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo.Abp.FeatureManagement.TestBase.csproj b/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo.Abp.FeatureManagement.TestBase.csproj
index 83288c97ec..08f71c7c2b 100644
--- a/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo.Abp.FeatureManagement.TestBase.csproj
+++ b/modules/feature-management/test/Volo.Abp.FeatureManagement.TestBase/Volo.Abp.FeatureManagement.TestBase.csproj
@@ -3,7 +3,7 @@
- netcoreapp2.2
+ netcoreapp3.0
@@ -14,7 +14,7 @@
-
+
diff --git a/modules/identity/src/Volo.Abp.Identity.Application/Volo.Abp.Identity.Application.csproj b/modules/identity/src/Volo.Abp.Identity.Application/Volo.Abp.Identity.Application.csproj
index 6c3ba1b676..8eac9e9162 100644
--- a/modules/identity/src/Volo.Abp.Identity.Application/Volo.Abp.Identity.Application.csproj
+++ b/modules/identity/src/Volo.Abp.Identity.Application/Volo.Abp.Identity.Application.csproj
@@ -16,9 +16,7 @@
-
-
diff --git a/modules/identity/src/Volo.Abp.Identity.AspNetCore/Properties/launchSettings.json b/modules/identity/src/Volo.Abp.Identity.AspNetCore/Properties/launchSettings.json
new file mode 100644
index 0000000000..fc5b1a72f7
--- /dev/null
+++ b/modules/identity/src/Volo.Abp.Identity.AspNetCore/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:53901/",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "Volo.Abp.Identity.AspNetCore": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "http://localhost:53902/"
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/identity/src/Volo.Abp.Identity.AspNetCore/Volo.Abp.Identity.AspNetCore.csproj b/modules/identity/src/Volo.Abp.Identity.AspNetCore/Volo.Abp.Identity.AspNetCore.csproj
index 12b84640c0..948dd4b7b3 100644
--- a/modules/identity/src/Volo.Abp.Identity.AspNetCore/Volo.Abp.Identity.AspNetCore.csproj
+++ b/modules/identity/src/Volo.Abp.Identity.AspNetCore/Volo.Abp.Identity.AspNetCore.csproj
@@ -1,20 +1,21 @@
-
+
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.Identity.AspNetCore
Volo.Abp.Identity.AspNetCore
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
false
false
false
+ true
+ Library
-
diff --git a/modules/identity/src/Volo.Abp.Identity.AspNetCore/Volo/Abp/Identity/AspNetCore/AbpSecurityStampValidator.cs b/modules/identity/src/Volo.Abp.Identity.AspNetCore/Volo/Abp/Identity/AspNetCore/AbpSecurityStampValidator.cs
index 5259047096..cf6e1f8d50 100644
--- a/modules/identity/src/Volo.Abp.Identity.AspNetCore/Volo/Abp/Identity/AspNetCore/AbpSecurityStampValidator.cs
+++ b/modules/identity/src/Volo.Abp.Identity.AspNetCore/Volo/Abp/Identity/AspNetCore/AbpSecurityStampValidator.cs
@@ -2,21 +2,24 @@
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Identity;
+using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Volo.Abp.Uow;
-namespace Volo.Abp.Identity
+namespace Volo.Abp.Identity.AspNetCore
{
public class AbpSecurityStampValidator : SecurityStampValidator
{
public AbpSecurityStampValidator(
IOptions options,
SignInManager signInManager,
- ISystemClock systemClock)
+ ISystemClock systemClock,
+ ILoggerFactory loggerFactory)
: base(
options,
signInManager,
- systemClock)
+ systemClock,
+ loggerFactory)
{
}
diff --git a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo.Abp.Identity.Domain.Shared.csproj b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo.Abp.Identity.Domain.Shared.csproj
index e86a7221de..6b58f2e433 100644
--- a/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo.Abp.Identity.Domain.Shared.csproj
+++ b/modules/identity/src/Volo.Abp.Identity.Domain.Shared/Volo.Abp.Identity.Domain.Shared.csproj
@@ -15,15 +15,11 @@
-
-
-
-
diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo.Abp.Identity.Domain.csproj b/modules/identity/src/Volo.Abp.Identity.Domain/Volo.Abp.Identity.Domain.csproj
index 0919140b8c..b3ccc2e1b1 100644
--- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo.Abp.Identity.Domain.csproj
+++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo.Abp.Identity.Domain.csproj
@@ -28,7 +28,7 @@
-
+
diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityClaim.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityClaim.cs
index 6b40b59ddb..d64218a68f 100644
--- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityClaim.cs
+++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityClaim.cs
@@ -20,11 +20,6 @@ namespace Volo.Abp.Identity
///
public virtual string ClaimValue { get; protected set; }
- public virtual bool Equals([NotNull] string claimType, [NotNull] string claimValue)
- {
- return ClaimType == claimType && ClaimValue == claimValue;
- }
-
protected IdentityClaim()
{
diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDataSeeder.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDataSeeder.cs
index 20fb67dd06..70945c2546 100644
--- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDataSeeder.cs
+++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityDataSeeder.cs
@@ -46,7 +46,7 @@ namespace Volo.Abp.Identity
//"admin" user
const string adminUserName = "admin";
var adminUser = await _userRepository.FindByNormalizedUserNameAsync(
- _lookupNormalizer.Normalize(adminUserName)
+ _lookupNormalizer.NormalizeName(adminUserName)
);
if (adminUser != null)
@@ -69,7 +69,7 @@ namespace Volo.Abp.Identity
//"admin" role
const string adminRoleName = "admin";
- var adminRole = await _roleRepository.FindByNormalizedNameAsync(_lookupNormalizer.Normalize(adminRoleName));
+ var adminRole = await _roleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName(adminRoleName));
if (adminRole == null)
{
adminRole = new IdentityRole(
diff --git a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserRepositoryExternalUserLookupServiceProvider.cs b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserRepositoryExternalUserLookupServiceProvider.cs
index 684eec938f..bbbebb81cd 100644
--- a/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserRepositoryExternalUserLookupServiceProvider.cs
+++ b/modules/identity/src/Volo.Abp.Identity.Domain/Volo/Abp/Identity/IdentityUserRepositoryExternalUserLookupServiceProvider.cs
@@ -39,7 +39,7 @@ namespace Volo.Abp.Identity
{
return (
await _userRepository.FindByNormalizedUserNameAsync(
- _lookupNormalizer.Normalize(userName),
+ _lookupNormalizer.NormalizeName(userName),
includeDetails: false,
cancellationToken: cancellationToken
)
diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo.Abp.Identity.EntityFrameworkCore.csproj b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo.Abp.Identity.EntityFrameworkCore.csproj
index 6b934006bc..945905d75f 100644
--- a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo.Abp.Identity.EntityFrameworkCore.csproj
+++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo.Abp.Identity.EntityFrameworkCore.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netstandard2.1
Volo.Abp.Identity.EntityFrameworkCore
Volo.Abp.Identity.EntityFrameworkCore
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
@@ -15,7 +15,6 @@
-
diff --git a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/IdentityDbContextModelBuilderExtensions.cs b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/IdentityDbContextModelBuilderExtensions.cs
index 946db12050..5df9e6de60 100644
--- a/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/IdentityDbContextModelBuilderExtensions.cs
+++ b/modules/identity/src/Volo.Abp.Identity.EntityFrameworkCore/Volo/Abp/Identity/EntityFrameworkCore/IdentityDbContextModelBuilderExtensions.cs
@@ -48,6 +48,8 @@ namespace Volo.Abp.Identity.EntityFrameworkCore
{
b.ToTable(options.TablePrefix + "UserClaims", options.Schema);
+ b.Property(x => x.Id).ValueGeneratedNever();
+
b.Property(uc => uc.ClaimType).HasMaxLength(IdentityUserClaimConsts.MaxClaimTypeLength).IsRequired();
b.Property(uc => uc.ClaimValue).HasMaxLength(IdentityUserClaimConsts.MaxClaimValueLength);
@@ -112,6 +114,8 @@ namespace Volo.Abp.Identity.EntityFrameworkCore
{
b.ToTable(options.TablePrefix + "RoleClaims", options.Schema);
+ b.Property(x => x.Id).ValueGeneratedNever();
+
b.Property(uc => uc.ClaimType).HasMaxLength(IdentityRoleClaimConsts.MaxClaimTypeLength).IsRequired();
b.Property(uc => uc.ClaimValue).HasMaxLength(IdentityRoleClaimConsts.MaxClaimValueLength);
diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Properties/launchSettings.json b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Properties/launchSettings.json
new file mode 100644
index 0000000000..6ba85345ab
--- /dev/null
+++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:53978/",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "Volo.Abp.Identity.HttpApi.Client": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "http://localhost:53980/"
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo.Abp.Identity.HttpApi.Client.csproj b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo.Abp.Identity.HttpApi.Client.csproj
index b7e8a18755..a32fc8b2d0 100644
--- a/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo.Abp.Identity.HttpApi.Client.csproj
+++ b/modules/identity/src/Volo.Abp.Identity.HttpApi.Client/Volo.Abp.Identity.HttpApi.Client.csproj
@@ -1,15 +1,17 @@
-
+
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.Identity.HttpApi.Client
Volo.Abp.Identity.HttpApi.Client
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
false
false
false
+ Library
+ true
diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi/Properties/launchSettings.json b/modules/identity/src/Volo.Abp.Identity.HttpApi/Properties/launchSettings.json
new file mode 100644
index 0000000000..2323768a18
--- /dev/null
+++ b/modules/identity/src/Volo.Abp.Identity.HttpApi/Properties/launchSettings.json
@@ -0,0 +1,27 @@
+{
+ "iisSettings": {
+ "windowsAuthentication": false,
+ "anonymousAuthentication": true,
+ "iisExpress": {
+ "applicationUrl": "http://localhost:53977/",
+ "sslPort": 0
+ }
+ },
+ "profiles": {
+ "IIS Express": {
+ "commandName": "IISExpress",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ }
+ },
+ "Volo.Abp.Identity.HttpApi": {
+ "commandName": "Project",
+ "launchBrowser": true,
+ "environmentVariables": {
+ "ASPNETCORE_ENVIRONMENT": "Development"
+ },
+ "applicationUrl": "http://localhost:53979/"
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo.Abp.Identity.HttpApi.csproj b/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo.Abp.Identity.HttpApi.csproj
index 01aba07d39..0ca4ef5564 100644
--- a/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo.Abp.Identity.HttpApi.csproj
+++ b/modules/identity/src/Volo.Abp.Identity.HttpApi/Volo.Abp.Identity.HttpApi.csproj
@@ -1,21 +1,22 @@
-
+
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.Identity.HttpApi
Volo.Abp.Identity.HttpApi
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
false
false
false
+ Library
+ true
-
diff --git a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo.Abp.Identity.MongoDB.csproj b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo.Abp.Identity.MongoDB.csproj
index ae04586f3e..06e5717e03 100644
--- a/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo.Abp.Identity.MongoDB.csproj
+++ b/modules/identity/src/Volo.Abp.Identity.MongoDB/Volo.Abp.Identity.MongoDB.csproj
@@ -1,4 +1,4 @@
-
+
@@ -15,7 +15,6 @@
-
diff --git a/modules/identity/src/Volo.Abp.Identity.Web/Volo.Abp.Identity.Web.csproj b/modules/identity/src/Volo.Abp.Identity.Web/Volo.Abp.Identity.Web.csproj
index 8209c1c303..3561790e74 100644
--- a/modules/identity/src/Volo.Abp.Identity.Web/Volo.Abp.Identity.Web.csproj
+++ b/modules/identity/src/Volo.Abp.Identity.Web/Volo.Abp.Identity.Web.csproj
@@ -3,19 +3,21 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.Identity.Web
Volo.Abp.Identity.Web
- true
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
false
false
false
Library
+ true
-
+
+
+
diff --git a/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo.Abp.Identity.Application.Tests.csproj b/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo.Abp.Identity.Application.Tests.csproj
index e4f89cb750..6474dec386 100644
--- a/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo.Abp.Identity.Application.Tests.csproj
+++ b/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo.Abp.Identity.Application.Tests.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.Identity.Application.Tests
Volo.Abp.Identity.Application.Tests
true
@@ -17,7 +17,7 @@
-
+
diff --git a/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityUserLookupAppService_Tests.cs b/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityUserLookupAppService_Tests.cs
index 7358238294..227977cf15 100644
--- a/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityUserLookupAppService_Tests.cs
+++ b/modules/identity/test/Volo.Abp.Identity.Application.Tests/Volo/Abp/Identity/IdentityUserLookupAppService_Tests.cs
@@ -24,7 +24,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task FindByIdAsync()
{
- var user = await _identityUserRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _identityUserRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
(await _identityUserLookupAppService.FindByIdAsync(user.Id)).UserName.ShouldBe(user.UserName);
@@ -40,7 +40,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task FindByUserNameAsync()
{
- var user = await _identityUserRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _identityUserRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
(await _identityUserLookupAppService.FindByUserNameAsync(user.UserName)).UserName.ShouldBe(user.UserName);
diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo.Abp.Identity.Domain.Tests.csproj b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo.Abp.Identity.Domain.Tests.csproj
index 2e53b10544..9f94e6283e 100644
--- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo.Abp.Identity.Domain.Tests.csproj
+++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo.Abp.Identity.Domain.Tests.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.Identity.Domain.Tests
Volo.Abp.Identity.Domain.Tests
true
@@ -18,7 +18,7 @@
-
+
diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/Distributed_User_Change_Event_Tests.cs b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/Distributed_User_Change_Event_Tests.cs
index 221adca6d5..f8b42584ec 100644
--- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/Distributed_User_Change_Event_Tests.cs
+++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/Distributed_User_Change_Event_Tests.cs
@@ -40,7 +40,7 @@ namespace Volo.Abp.Identity
{
using (var uow = _unitOfWorkManager.Begin())
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
await _userManager.SetEmailAsync(user, "john.nash_UPDATED@abp.io");
_testCounter.GetValue("EntityUpdatedEto").ShouldBe(0);
diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityRoleManager_Tests.cs b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityRoleManager_Tests.cs
index 9cdafa10bb..4314f3eac6 100644
--- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityRoleManager_Tests.cs
+++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityRoleManager_Tests.cs
@@ -37,7 +37,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task SetRoleNameAsync()
{
- var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.Normalize("moderator"));
+ var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator"));
role.ShouldNotBeNull();
(await _identityRoleManager.SetRoleNameAsync(role, "teacher")).Succeeded.ShouldBeTrue();
@@ -48,12 +48,12 @@ namespace Volo.Abp.Identity
[Fact]
public async Task DeleteAsync()
{
- var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.Normalize("moderator"));
+ var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator"));
role.ShouldNotBeNull();
await _identityRoleManager.DeleteAsync(role);
- (await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.Normalize("moderator"))).ShouldBeNull();
+ (await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator"))).ShouldBeNull();
}
}
diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityRoleStore_Tests.cs b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityRoleStore_Tests.cs
index d2f674411b..11345a4a46 100644
--- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityRoleStore_Tests.cs
+++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityRoleStore_Tests.cs
@@ -43,7 +43,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task UpdateAsync()
{
- var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.Normalize("moderator"));
+ var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator"));
role.ShouldNotBeNull();
role.IsDefault = true;
@@ -56,7 +56,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task DeleteAsync()
{
- var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.Normalize("moderator"));
+ var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator"));
role.ShouldNotBeNull();
await _identityRoleStore.DeleteAsync(role);
@@ -67,7 +67,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task GetRoleIdAsync()
{
- var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.Normalize("moderator"));
+ var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator"));
role.ShouldNotBeNull();
(await _identityRoleStore.GetRoleIdAsync(role)).ShouldBe(_testData.RoleModeratorId.ToString());
@@ -76,7 +76,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task GetRoleNameAsync()
{
- var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.Normalize("moderator"));
+ var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator"));
role.ShouldNotBeNull();
(await _identityRoleStore.GetRoleNameAsync(role)).ShouldBe(role.Name);
@@ -86,7 +86,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task SetRoleNameAsync()
{
- var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.Normalize("moderator"));
+ var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator"));
role.ShouldNotBeNull();
await _identityRoleStore.SetRoleNameAsync(role, "teacher");
@@ -106,7 +106,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task FindByNameAsync()
{
- var role = await _identityRoleStore.FindByNameAsync(_lookupNormalizer.Normalize("moderator"));
+ var role = await _identityRoleStore.FindByNameAsync(_lookupNormalizer.NormalizeName("moderator"));
role.ShouldNotBeNull();
role.Name.ShouldBe("moderator");
@@ -115,7 +115,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task GetNormalizedRoleNameAsync()
{
- var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.Normalize("moderator"));
+ var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator"));
role.ShouldNotBeNull();
(await _identityRoleStore.GetNormalizedRoleNameAsync(role)).ShouldBe(role.NormalizedName);
@@ -124,12 +124,12 @@ namespace Volo.Abp.Identity
[Fact]
public async Task SetNormalizedRoleNameAsync()
{
- var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.Normalize("moderator"));
+ var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator"));
role.ShouldNotBeNull();
- await _identityRoleStore.SetNormalizedRoleNameAsync(role, _lookupNormalizer.Normalize("teacher"));
+ await _identityRoleStore.SetNormalizedRoleNameAsync(role, _lookupNormalizer.NormalizeName("teacher"));
- role.NormalizedName.ShouldBe(_lookupNormalizer.Normalize("teacher"));
+ role.NormalizedName.ShouldBe(_lookupNormalizer.NormalizeName("teacher"));
}
[Fact]
@@ -137,7 +137,7 @@ namespace Volo.Abp.Identity
{
using (var uow = _unitOfWorkManager.Begin())
{
- var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.Normalize("moderator"));
+ var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator"));
role.ShouldNotBeNull();
var claims = await _identityRoleStore.GetClaimsAsync(role);
@@ -149,30 +149,41 @@ namespace Volo.Abp.Identity
}
}
-
[Fact]
public async Task AddClaimAsync()
{
- using (var uow = _unitOfWorkManager.Begin())
+ try
{
- var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.Normalize("moderator"));
- role.ShouldNotBeNull();
+ using (var uow = _unitOfWorkManager.Begin())
+ {
+ var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator"));
+ role.ShouldNotBeNull();
- await _identityRoleStore.AddClaimAsync(role, new Claim("my-claim", "my-value"));
+ role.Claims.Add(new IdentityRoleClaim(Guid.NewGuid(), role.Id, "my-claim", "my-value", role.TenantId));
+ //await _identityRoleStore.AddClaimAsync(role, new Claim("my-claim", "my-value"));
- role.Claims.ShouldContain(x => x.ClaimType == "my-claim" && x.ClaimValue == "my-value");
+ //role.Claims.ShouldContain(x => x.ClaimType == "my-claim" && x.ClaimValue == "my-value");
- await uow.CompleteAsync();
+ await uow.CompleteAsync();
+ }
+
+ }
+ catch (Exception e)
+ {
+ throw;
}
+
+ var role2 = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator"));
+ role2.ShouldNotBeNull();
+ role2.Claims.ShouldContain(x => x.ClaimType == "my-claim" && x.ClaimValue == "my-value");
}
-
[Fact]
public async Task RemoveClaimAsync()
{
using (var uow = _unitOfWorkManager.Begin())
{
- var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.Normalize("moderator"));
+ var role = await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("moderator"));
role.ShouldNotBeNull();
await _identityRoleStore.RemoveClaimAsync(role, new Claim("test-claim", "test-value"));
diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserManager_Tests.cs b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserManager_Tests.cs
index 3755342375..761655deb2 100644
--- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserManager_Tests.cs
+++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserManager_Tests.cs
@@ -43,7 +43,7 @@ namespace Volo.Abp.Identity
using (var uow = _unitOfWorkManager.Begin())
{
var user = await _identityUserRepository.FindByNormalizedUserNameAsync(
- _lookupNormalizer.Normalize("david"));
+ _lookupNormalizer.NormalizeName("david"));
user.ShouldNotBeNull();
var identityResult = await _identityUserManager.SetRolesAsync(user, new List()
@@ -64,11 +64,11 @@ namespace Volo.Abp.Identity
using (var uow = _unitOfWorkManager.Begin())
{
var roleSupporter =
- await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.Normalize("supporter"));
+ await _identityRoleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("supporter"));
roleSupporter.ShouldNotBeNull();
var user = await _identityUserRepository.FindByNormalizedUserNameAsync(
- _lookupNormalizer.Normalize("john.nash"));
+ _lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
var identityResult = await _identityUserManager.SetRolesAsync(user, new List()
diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserStore_Tests.cs b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserStore_Tests.cs
index 0e4c1e8bc6..6e84a88450 100644
--- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserStore_Tests.cs
+++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/IdentityUserStore_Tests.cs
@@ -1,11 +1,9 @@
using System;
using System.Collections.Generic;
using System.Security.Claims;
-using System.Text;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Identity;
using Shouldly;
-using Volo.Abp.Guids;
using Volo.Abp.Uow;
using Xunit;
@@ -31,7 +29,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task GetUserIdAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
(await _identityUserStore.GetUserIdAsync(user)).ShouldBe(user.Id.ToString());
@@ -41,7 +39,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task GetUserNameAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
(await _identityUserStore.GetUserNameAsync(user)).ShouldBe(user.UserName);
@@ -50,7 +48,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task SetUserNameAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
await _identityUserStore.SetUserNameAsync(user, "bob.lee");
@@ -62,7 +60,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task GetNormalizedUserNameAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
(await _identityUserStore.GetNormalizedUserNameAsync(user)).ShouldBe(user.NormalizedUserName);
@@ -71,12 +69,12 @@ namespace Volo.Abp.Identity
[Fact]
public async Task SetNormalizedUserNameAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
- await _identityUserStore.SetNormalizedUserNameAsync(user, _lookupNormalizer.Normalize("bob.lee"));
+ await _identityUserStore.SetNormalizedUserNameAsync(user, _lookupNormalizer.NormalizeName("bob.lee"));
- user.NormalizedUserName.ShouldBe(_lookupNormalizer.Normalize("bob.lee"));
+ user.NormalizedUserName.ShouldBe(_lookupNormalizer.NormalizeName("bob.lee"));
}
[Fact]
@@ -87,7 +85,7 @@ namespace Volo.Abp.Identity
await _identityUserStore.CreateAsync(user);
- var bobLee = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("bob.lee"));
+ var bobLee = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("bob.lee"));
bobLee.ShouldNotBeNull();
bobLee.UserName.ShouldBe("bob.lee");
bobLee.Email.ShouldBe("bob.lee@abp.io");
@@ -96,20 +94,20 @@ namespace Volo.Abp.Identity
[Fact]
public async Task UpdateAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
user.Name = "lee";
(await _identityUserStore.UpdateAsync(user)).Succeeded.ShouldBeTrue();
- (await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"))).Name
+ (await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"))).Name
.ShouldBe("lee");
}
[Fact]
public async Task Update_Concurrency()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
(await _identityUserStore.UpdateAsync(user)).Succeeded.ShouldBeTrue();
@@ -128,12 +126,12 @@ namespace Volo.Abp.Identity
[Fact]
public async Task DeleteAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
(await _identityUserStore.DeleteAsync(user)).Succeeded.ShouldBeTrue();
- (await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"))).ShouldBeNull();
+ (await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"))).ShouldBeNull();
}
@@ -150,7 +148,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task FindByNameAsync()
{
- var user = await _identityUserStore.FindByNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _identityUserStore.FindByNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
user.UserName.ShouldBe("john.nash");
@@ -160,7 +158,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task SetPasswordHashAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
user.PasswordHash.ShouldBeNull();
@@ -172,7 +170,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task GetPasswordHashAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
await _identityUserStore.SetPasswordHashAsync(user, "P@ssw0rd");
@@ -183,7 +181,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task HasPasswordAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
(await _identityUserStore.HasPasswordAsync(user)).ShouldBeFalse();
@@ -191,17 +189,16 @@ namespace Volo.Abp.Identity
(await _identityUserStore.HasPasswordAsync(user)).ShouldBeTrue();
}
-
[Fact]
public async Task AddToRoleAsync()
{
using (var uow = _unitOfWorkManager.Begin())
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("david"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("david"));
user.ShouldNotBeNull();
user.Roles.ShouldBeEmpty();
- await _identityUserStore.AddToRoleAsync(user, _lookupNormalizer.Normalize("moderator"));
+ await _identityUserStore.AddToRoleAsync(user, _lookupNormalizer.NormalizeName("moderator"));
user.Roles.ShouldContain(x => x.RoleId == _testData.RoleModeratorId);
@@ -209,17 +206,16 @@ namespace Volo.Abp.Identity
}
}
-
[Fact]
public async Task RemoveFromRoleAsync()
{
using (var uow = _unitOfWorkManager.Begin())
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
user.Roles.ShouldContain(x => x.RoleId == _testData.RoleModeratorId);
- await _identityUserStore.RemoveFromRoleAsync(user, _lookupNormalizer.Normalize("moderator"));
+ await _identityUserStore.RemoveFromRoleAsync(user, _lookupNormalizer.NormalizeName("moderator"));
user.Roles.ShouldNotContain(x => x.RoleId == _testData.RoleModeratorId);
@@ -231,7 +227,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task GetRolesAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
var roleNames = await _identityUserStore.GetRolesAsync(user);
@@ -245,23 +241,22 @@ namespace Volo.Abp.Identity
{
using (var uow = _unitOfWorkManager.Begin())
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
- (await _identityUserStore.IsInRoleAsync(user, _lookupNormalizer.Normalize("moderator"))).ShouldBeTrue();
- (await _identityUserStore.IsInRoleAsync(user, _lookupNormalizer.Normalize("moderatorNotExist"))).ShouldBeFalse();
+ (await _identityUserStore.IsInRoleAsync(user, _lookupNormalizer.NormalizeName("moderator"))).ShouldBeTrue();
+ (await _identityUserStore.IsInRoleAsync(user, _lookupNormalizer.NormalizeName("moderatorNotExist"))).ShouldBeFalse();
await uow.CompleteAsync();
}
}
-
[Fact]
public async Task GetClaimsAsync()
{
using (var uow = _unitOfWorkManager.Begin())
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
var claims = await _identityUserStore.GetClaimsAsync(user);
@@ -277,8 +272,9 @@ namespace Volo.Abp.Identity
{
using (var uow = _unitOfWorkManager.Begin())
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
+ user.Claims.ShouldNotContain(x => x.ClaimType == "MyClaimType" && x.ClaimValue == "MyClaimValue");
await _identityUserStore.AddClaimsAsync(user, new List()
{
@@ -291,13 +287,12 @@ namespace Volo.Abp.Identity
}
}
-
[Fact]
public async Task ReplaceClaimAsync()
{
using (var uow = _unitOfWorkManager.Begin())
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
await _identityUserStore.ReplaceClaimAsync(user, new Claim("TestClaimType", "42"), new Claim("MyClaimType", "MyClaimValue"));
@@ -308,14 +303,13 @@ namespace Volo.Abp.Identity
await uow.CompleteAsync();
}
}
-
-
+
[Fact]
public async Task RemoveClaimsAsync()
{
using (var uow = _unitOfWorkManager.Begin())
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
await _identityUserStore.RemoveClaimsAsync(user, new List()
@@ -329,13 +323,12 @@ namespace Volo.Abp.Identity
}
}
-
[Fact]
public async Task AddLoginAsync()
{
using (var uow = _unitOfWorkManager.Begin())
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
user.Logins.ShouldNotContain(x => x.LoginProvider == "facebook" && x.ProviderKey == "john");
@@ -352,7 +345,7 @@ namespace Volo.Abp.Identity
{
using (var uow = _unitOfWorkManager.Begin())
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
user.Logins.ShouldContain(x => x.LoginProvider == "github" && x.ProviderKey == "john");
@@ -370,7 +363,7 @@ namespace Volo.Abp.Identity
{
using (var uow = _unitOfWorkManager.Begin())
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
var logins = await _identityUserStore.GetLoginsAsync(user);
@@ -396,7 +389,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task GetEmailConfirmedAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
(await _identityUserStore.GetEmailConfirmedAsync(user)).ShouldBe(user.EmailConfirmed);
@@ -406,7 +399,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task SetEmailConfirmedAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
var emailConfirmed = user.EmailConfirmed;
@@ -418,7 +411,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task SetEmailAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
await _identityUserStore.SetEmailAsync(user, "john.nash.kobe@abp.io");
@@ -430,7 +423,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task GetEmailAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
(await _identityUserStore.GetEmailAsync(user)).ShouldBe(user.Email);
@@ -439,7 +432,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task GetNormalizedEmailAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
(await _identityUserStore.GetNormalizedEmailAsync(user)).ShouldBe(user.NormalizedEmail);
@@ -448,18 +441,18 @@ namespace Volo.Abp.Identity
[Fact]
public async Task SetNormalizedEmailAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
- await _identityUserStore.SetNormalizedEmailAsync(user, _lookupNormalizer.Normalize("john.nash.kobe@abp.io"));
+ await _identityUserStore.SetNormalizedEmailAsync(user, _lookupNormalizer.NormalizeEmail("john.nash.kobe@abp.io"));
- user.NormalizedEmail.ShouldBe(_lookupNormalizer.Normalize("john.nash.kobe@abp.io"));
+ user.NormalizedEmail.ShouldBe(_lookupNormalizer.NormalizeEmail("john.nash.kobe@abp.io"));
}
[Fact]
public async Task FindByEmailAsync()
{
- var user = await _identityUserStore.FindByEmailAsync(_lookupNormalizer.Normalize("john.nash@abp.io"));
+ var user = await _identityUserStore.FindByEmailAsync(_lookupNormalizer.NormalizeEmail("john.nash@abp.io"));
user.ShouldNotBeNull();
user.Email.ShouldBe("john.nash@abp.io");
@@ -468,7 +461,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task GetLockoutEndDateAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
(await _identityUserStore.GetLockoutEndDateAsync(user)).ShouldBe(user.LockoutEnd);
@@ -477,7 +470,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task SetLockoutEndDateAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
await _identityUserStore.SetLockoutEndDateAsync(user, DateTimeOffset.Parse("01/01/2019"));
@@ -489,7 +482,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task IncrementAccessFailedCountAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
var count = user.AccessFailedCount;
@@ -501,7 +494,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task ResetAccessFailedCountAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
await _identityUserStore.ResetAccessFailedCountAsync(user);
@@ -512,7 +505,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task GetAccessFailedCountAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
(await _identityUserStore.GetAccessFailedCountAsync(user)).ShouldBe(user.AccessFailedCount);
@@ -521,7 +514,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task GetLockoutEnabledAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
(await _identityUserStore.GetLockoutEnabledAsync(user)).ShouldBe(user.LockoutEnabled);
@@ -530,7 +523,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task SetLockoutEnabledAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
var lockoutEnabled = user.LockoutEnabled;
@@ -543,7 +536,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task SetPhoneNumberAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
await _identityUserStore.SetPhoneNumberAsync(user, "13800138000");
@@ -555,7 +548,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task GetPhoneNumberAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
(await _identityUserStore.GetPhoneNumberAsync(user)).ShouldBe(user.PhoneNumber);
@@ -564,7 +557,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task GetPhoneNumberConfirmedAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
(await _identityUserStore.GetPhoneNumberConfirmedAsync(user)).ShouldBe(user.PhoneNumberConfirmed);
@@ -574,7 +567,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task SetPhoneNumberConfirmedAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
var phoneNumberConfirmed = user.PhoneNumberConfirmed;
@@ -587,7 +580,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task SetSecurityStampAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
var securityStamp = Guid.NewGuid().ToString();
@@ -599,7 +592,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task GetSecurityStampAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
(await _identityUserStore.GetSecurityStampAsync(user)).ShouldBe(user.SecurityStamp);
@@ -609,7 +602,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task SetTwoFactorEnabledAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
var twoFactorEnabled = user.TwoFactorEnabled;
@@ -622,7 +615,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task GetTwoFactorEnabledAsync()
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
(await _identityUserStore.GetTwoFactorEnabledAsync(user)).ShouldBe(user.TwoFactorEnabled);
@@ -640,7 +633,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task GetUsersInRoleAsync()
{
- var user = await _identityUserStore.GetUsersInRoleAsync(_lookupNormalizer.Normalize("moderator"));
+ var user = await _identityUserStore.GetUsersInRoleAsync(_lookupNormalizer.NormalizeName("moderator"));
user.ShouldNotBeNull();
user.ShouldContain(x => x.UserName == "john.nash");
}
@@ -650,7 +643,7 @@ namespace Volo.Abp.Identity
{
using (var uow = _unitOfWorkManager.Begin())
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
await _identityUserStore.SetTokenAsync(user, "test-provider", "test-name", "123123");
@@ -667,7 +660,7 @@ namespace Volo.Abp.Identity
{
using (var uow = _unitOfWorkManager.Begin())
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
await _identityUserStore.RemoveTokenAsync(user, "test-provider", "test-name");
@@ -683,7 +676,7 @@ namespace Volo.Abp.Identity
{
using (var uow = _unitOfWorkManager.Begin())
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
(await _identityUserStore.GetTokenAsync(user, "test-provider", "test-name")).ShouldBe("test-value");
@@ -697,7 +690,7 @@ namespace Volo.Abp.Identity
{
using (var uow = _unitOfWorkManager.Begin())
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
await _identityUserStore.SetAuthenticatorKeyAsync(user, "testKey");
@@ -713,7 +706,7 @@ namespace Volo.Abp.Identity
{
using (var uow = _unitOfWorkManager.Begin())
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
await _identityUserStore.SetAuthenticatorKeyAsync(user, "testKey");
@@ -729,7 +722,7 @@ namespace Volo.Abp.Identity
{
using (var uow = _unitOfWorkManager.Begin())
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
await _identityUserStore.SetTokenAsync(user, "[AspNetUserStore]", "RecoveryCodes", "testKey;testKey2");
@@ -744,7 +737,7 @@ namespace Volo.Abp.Identity
{
using (var uow = _unitOfWorkManager.Begin())
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
await _identityUserStore.ReplaceCodesAsync(user, new List()
@@ -764,7 +757,7 @@ namespace Volo.Abp.Identity
{
using (var uow = _unitOfWorkManager.Begin())
{
- var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("john.nash"));
+ var user = await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("john.nash"));
user.ShouldNotBeNull();
await _identityUserStore.SetTokenAsync(user, "[AspNetUserStore]", "RecoveryCodes", "testKey;testKey2");
diff --git a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/TestPermissionDataBuilder.cs b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/TestPermissionDataBuilder.cs
index b5272ed0e7..0fc834ccc0 100644
--- a/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/TestPermissionDataBuilder.cs
+++ b/modules/identity/test/Volo.Abp.Identity.Domain.Tests/Volo/Abp/Identity/TestPermissionDataBuilder.cs
@@ -45,7 +45,7 @@ namespace Volo.Abp.Identity
private void AddUserPermissions()
{
- var david = _userRepository.FindByNormalizedUserName(_lookupNormalizer.Normalize("david"));
+ var david = _userRepository.FindByNormalizedUserName(_lookupNormalizer.NormalizeName("david"));
AddPermission(TestPermissionNames.MyPermission1, UserPermissionValueProvider.ProviderName, david.Id.ToString());
}
diff --git a/modules/identity/test/Volo.Abp.Identity.EntityFrameworkCore.Tests/Volo.Abp.Identity.EntityFrameworkCore.Tests.csproj b/modules/identity/test/Volo.Abp.Identity.EntityFrameworkCore.Tests/Volo.Abp.Identity.EntityFrameworkCore.Tests.csproj
index c10e693a69..7aed694519 100644
--- a/modules/identity/test/Volo.Abp.Identity.EntityFrameworkCore.Tests/Volo.Abp.Identity.EntityFrameworkCore.Tests.csproj
+++ b/modules/identity/test/Volo.Abp.Identity.EntityFrameworkCore.Tests/Volo.Abp.Identity.EntityFrameworkCore.Tests.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.Identity.EntityFrameworkCore.Tests
Volo.Abp.Identity.EntityFrameworkCore.Tests
true
@@ -20,10 +20,10 @@
-
-
-
-
+
+
+
+
diff --git a/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo.Abp.Identity.MongoDB.Tests.csproj b/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo.Abp.Identity.MongoDB.Tests.csproj
index ee3d4cfe5a..9648fd3500 100644
--- a/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo.Abp.Identity.MongoDB.Tests.csproj
+++ b/modules/identity/test/Volo.Abp.Identity.MongoDB.Tests/Volo.Abp.Identity.MongoDB.Tests.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.Identity.MongoDB.Tests
Volo.Abp.Identity.MongoDB.Tests
true
@@ -19,8 +19,8 @@
-
-
+
+
diff --git a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo.Abp.Identity.TestBase.csproj b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo.Abp.Identity.TestBase.csproj
index 6ab303021c..96eafd0ac1 100644
--- a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo.Abp.Identity.TestBase.csproj
+++ b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo.Abp.Identity.TestBase.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.Identity.TestBase
Volo.Abp.Identity.TestBase
true
@@ -19,7 +19,7 @@
-
+
diff --git a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/AbpIdentityTestDataBuilder.cs b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/AbpIdentityTestDataBuilder.cs
index ee5fc56fd9..6df6fd8cb3 100644
--- a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/AbpIdentityTestDataBuilder.cs
+++ b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/AbpIdentityTestDataBuilder.cs
@@ -43,7 +43,7 @@ namespace Volo.Abp.Identity
private void AddRoles()
{
- _adminRole = _roleRepository.FindByNormalizedName(_lookupNormalizer.Normalize("admin"));
+ _adminRole = _roleRepository.FindByNormalizedName(_lookupNormalizer.NormalizeName("admin"));
_moderator = new IdentityRole(_testData.RoleModeratorId, "moderator");
_moderator.AddClaim(_guidGenerator, new Claim("test-claim", "test-value"));
diff --git a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityDataSeeder_Tests.cs b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityDataSeeder_Tests.cs
index a30cb6dd05..65eac5bc9d 100644
--- a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityDataSeeder_Tests.cs
+++ b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityDataSeeder_Tests.cs
@@ -27,9 +27,9 @@ namespace Volo.Abp.Identity
{
await _identityDataSeeder.SeedAsync("admin@abp.io", "1q2w3E*");
- (await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("admin"))).ShouldNotBeNull();
- (await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.Normalize("admin"))).Name.ShouldBe("admin");
- (await _roleRepository.FindByNormalizedNameAsync(_lookupNormalizer.Normalize("admin"))).ShouldNotBeNull();
+ (await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("admin"))).ShouldNotBeNull();
+ (await _userRepository.FindByNormalizedUserNameAsync(_lookupNormalizer.NormalizeName("admin"))).Name.ShouldBe("admin");
+ (await _roleRepository.FindByNormalizedNameAsync(_lookupNormalizer.NormalizeName("admin"))).ShouldNotBeNull();
}
}
}
diff --git a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityRoleRepository_Tests.cs b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityRoleRepository_Tests.cs
index c753c1958b..e4a15d15f1 100644
--- a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityRoleRepository_Tests.cs
+++ b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityRoleRepository_Tests.cs
@@ -23,8 +23,8 @@ namespace Volo.Abp.Identity
[Fact]
public async Task FindByNormalizedNameAsync()
{
- (await RoleRepository.FindByNormalizedNameAsync(LookupNormalizer.Normalize("admin"))).ShouldNotBeNull();
- (await RoleRepository.FindByNormalizedNameAsync(LookupNormalizer.Normalize("undefined-role"))).ShouldBeNull();
+ (await RoleRepository.FindByNormalizedNameAsync(LookupNormalizer.NormalizeName("admin"))).ShouldNotBeNull();
+ (await RoleRepository.FindByNormalizedNameAsync(LookupNormalizer.NormalizeName("undefined-role"))).ShouldBeNull();
}
[Fact]
@@ -45,7 +45,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task Should_Eager_Load_Role_Collections()
{
- var role = await RoleRepository.FindByNormalizedNameAsync(LookupNormalizer.Normalize("moderator"));
+ var role = await RoleRepository.FindByNormalizedNameAsync(LookupNormalizer.NormalizeName("moderator"));
role.Claims.ShouldNotBeNull();
role.Claims.Any().ShouldBeTrue();
}
diff --git a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityUserRepository_Tests.cs b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityUserRepository_Tests.cs
index 7ad01100e8..dca811da0b 100644
--- a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityUserRepository_Tests.cs
+++ b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/IdentityUserRepository_Tests.cs
@@ -25,22 +25,22 @@ namespace Volo.Abp.Identity
[Fact]
public async Task FindByNormalizedUserNameAsync()
{
- (await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.Normalize("john.nash"))).ShouldNotBeNull();
- (await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.Normalize("undefined-user"))).ShouldBeNull();
+ (await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.NormalizeName("john.nash"))).ShouldNotBeNull();
+ (await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.NormalizeName("undefined-user"))).ShouldBeNull();
}
[Fact]
public async Task FindByNormalizedEmailAsync()
{
- (await UserRepository.FindByNormalizedEmailAsync(LookupNormalizer.Normalize("john.nash@abp.io"))).ShouldNotBeNull();
- (await UserRepository.FindByNormalizedEmailAsync(LookupNormalizer.Normalize("david@abp.io"))).ShouldNotBeNull();
- (await UserRepository.FindByNormalizedEmailAsync(LookupNormalizer.Normalize("undefined-user@abp.io"))).ShouldBeNull();
+ (await UserRepository.FindByNormalizedEmailAsync(LookupNormalizer.NormalizeEmail("john.nash@abp.io"))).ShouldNotBeNull();
+ (await UserRepository.FindByNormalizedEmailAsync(LookupNormalizer.NormalizeEmail("david@abp.io"))).ShouldNotBeNull();
+ (await UserRepository.FindByNormalizedEmailAsync(LookupNormalizer.NormalizeEmail("undefined-user@abp.io"))).ShouldBeNull();
}
[Fact]
public async Task GetRoleNamesAsync()
{
- var john = await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.Normalize("john.nash"));
+ var john = await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.NormalizeName("john.nash"));
var roles = await UserRepository.GetRoleNamesAsync(john.Id);
roles.Count.ShouldBe(2);
roles.ShouldContain("moderator");
@@ -80,7 +80,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task GetListByNormalizedRoleNameAsync()
{
- var users = await UserRepository.GetListByNormalizedRoleNameAsync(LookupNormalizer.Normalize("supporter"));
+ var users = await UserRepository.GetListByNormalizedRoleNameAsync(LookupNormalizer.NormalizeName("supporter"));
users.Count.ShouldBe(2);
users.ShouldContain(u => u.UserName == "john.nash");
users.ShouldContain(u => u.UserName == "neo");
@@ -114,7 +114,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task GetRolesAsync()
{
- var john = await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.Normalize("john.nash"));
+ var john = await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.NormalizeName("john.nash"));
var roles = await UserRepository.GetRolesAsync(john.Id);
roles.Count.ShouldBe(2);
roles.ShouldContain(r => r.Name == "moderator");
@@ -131,7 +131,7 @@ namespace Volo.Abp.Identity
[Fact]
public async Task Should_Eager_Load_User_Collections()
{
- var john = await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.Normalize("john.nash"));
+ var john = await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.NormalizeName("john.nash"));
john.Roles.ShouldNotBeNull();
john.Roles.Any().ShouldBeTrue();
diff --git a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/LazyLoading_Tests.cs b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/LazyLoading_Tests.cs
index 2a8f7c81a3..1ae671dd4f 100644
--- a/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/LazyLoading_Tests.cs
+++ b/modules/identity/test/Volo.Abp.Identity.TestBase/Volo/Abp/Identity/LazyLoading_Tests.cs
@@ -28,7 +28,7 @@ namespace Volo.Abp.Identity
{
using (var uow = GetRequiredService().Begin())
{
- var role = await RoleRepository.FindByNormalizedNameAsync(LookupNormalizer.Normalize("moderator"), includeDetails: false);
+ var role = await RoleRepository.FindByNormalizedNameAsync(LookupNormalizer.NormalizeName("moderator"), includeDetails: false);
role.Claims.ShouldNotBeNull();
role.Claims.Any().ShouldBeTrue();
@@ -41,7 +41,7 @@ namespace Volo.Abp.Identity
{
using (var uow = GetRequiredService().Begin())
{
- var john = await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.Normalize("john.nash"), includeDetails: false);
+ var john = await UserRepository.FindByNormalizedUserNameAsync(LookupNormalizer.NormalizeName("john.nash"), includeDetails: false);
john.Roles.ShouldNotBeNull();
john.Roles.Any().ShouldBeTrue();
diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo.Abp.IdentityServer.Domain.csproj b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo.Abp.IdentityServer.Domain.csproj
index f642574118..25b1c9c888 100644
--- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo.Abp.IdentityServer.Domain.csproj
+++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo.Abp.IdentityServer.Domain.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.IdentityServer.Domain
Volo.Abp.IdentityServer.Domain
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
@@ -22,8 +22,8 @@
-
-
+
+
diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpProfileService.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpProfileService.cs
index 63cbad5a87..f3bca6dba9 100644
--- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpProfileService.cs
+++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpProfileService.cs
@@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Identity;
using Volo.Abp.Identity;
using Volo.Abp.MultiTenancy;
using Volo.Abp.Uow;
+using IdentityUser = Volo.Abp.Identity.IdentityUser;
namespace Volo.Abp.IdentityServer.AspNetIdentity
{
diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpResourceOwnerPasswordValidator.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpResourceOwnerPasswordValidator.cs
index 00d5d1039a..eff9f4b0dc 100644
--- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpResourceOwnerPasswordValidator.cs
+++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/AspNetIdentity/AbpResourceOwnerPasswordValidator.cs
@@ -9,9 +9,9 @@ using IdentityServer4.Services;
using IdentityServer4.Validation;
using Microsoft.AspNetCore.Identity;
using Microsoft.Extensions.Logging;
-using Volo.Abp.Identity;
using Volo.Abp.Security.Claims;
using Volo.Abp.Uow;
+using IdentityUser = Volo.Abp.Identity.IdentityUser;
namespace Volo.Abp.IdentityServer.AspNetIdentity
{
diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrantStore.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrantStore.cs
index ab8bb6ffbd..400b5c0e26 100644
--- a/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrantStore.cs
+++ b/modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Grants/PersistedGrantStore.cs
@@ -2,6 +2,7 @@
using System.Linq;
using System.Threading.Tasks;
using IdentityServer4.Stores;
+using Volo.Abp.Domain.Entities;
using Volo.Abp.Guids;
using Volo.Abp.ObjectMapping;
@@ -26,7 +27,7 @@ namespace Volo.Abp.IdentityServer.Grants
if (entity == null)
{
entity = _objectMapper.Map(grant);
- entity.Id = _guidGenerator.Create();
+ EntityHelper.TrySetId(entity, () => _guidGenerator.Create());
await _persistentGrantRepository.InsertAsync(entity);
}
else
diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo.Abp.IdentityServer.EntityFrameworkCore.csproj b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo.Abp.IdentityServer.EntityFrameworkCore.csproj
index ec2eb3e809..787c285cfb 100644
--- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo.Abp.IdentityServer.EntityFrameworkCore.csproj
+++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo.Abp.IdentityServer.EntityFrameworkCore.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.IdentityServer.EntityFrameworkCore
Volo.Abp.IdentityServer.EntityFrameworkCore
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
@@ -15,7 +15,6 @@
-
diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs
index 8d0d6f1efd..44218470fd 100644
--- a/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs
+++ b/modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs
@@ -39,9 +39,8 @@ namespace Volo.Abp.IdentityServer.Clients
public async Task> GetAllDistinctAllowedCorsOriginsAsync(CancellationToken cancellationToken = default)
{
- return await DbSet
- .AsNoTracking()
- .SelectMany(x => x.AllowedCorsOrigins.Select(y => y.Origin))
+ return await DbContext.ClientCorsOrigins
+ .Select(x => x.Origin)
.Distinct()
.ToListAsync(GetCancellationToken(cancellationToken));
}
diff --git a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo.Abp.IdentityServer.MongoDB.csproj b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo.Abp.IdentityServer.MongoDB.csproj
index 4c3c98f6bf..d6d5c806de 100644
--- a/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo.Abp.IdentityServer.MongoDB.csproj
+++ b/modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo.Abp.IdentityServer.MongoDB.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.IdentityServer.MongoDB
Volo.Abp.IdentityServer.MongoDB
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
@@ -15,7 +15,6 @@
-
diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo.Abp.IdentityServer.Domain.Tests.csproj b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo.Abp.IdentityServer.Domain.Tests.csproj
index b6c251bd3f..c136a6bce0 100644
--- a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo.Abp.IdentityServer.Domain.Tests.csproj
+++ b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo.Abp.IdentityServer.Domain.Tests.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.IdentityServer.Domain.Tests
Volo.Abp.IdentityServer.Domain.Tests
true
diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/PersistentGrant_Tests.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/PersistentGrant_Tests.cs
index 4621daa3f4..8e83f57c51 100644
--- a/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/PersistentGrant_Tests.cs
+++ b/modules/identityserver/test/Volo.Abp.IdentityServer.Domain.Tests/Volo/Abp/IdentityServer/Clients/PersistentGrant_Tests.cs
@@ -138,7 +138,10 @@ namespace Volo.Abp.IdentityServer.Clients
//Arrange
await _persistedGrantStore.StoreAsync(new PersistedGrant
{
- Key = "#1P3R"
+ Key = "#1P3R",
+ Type = "Type",
+ ClientId = "ClientId",
+ Data = ""
});
//Act
diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests.csproj b/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests.csproj
index 10325012d9..d61fc1bd39 100644
--- a/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests.csproj
+++ b/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.IdentityServer.EntityFrameworkCore.Tests
Volo.Abp.IdentityServer.EntityFrameworkCore.Tests
true
@@ -13,14 +13,13 @@
-
-
+
diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestEntityFrameworkCoreModule.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestEntityFrameworkCoreModule.cs
index b5515026de..627ae45e38 100644
--- a/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestEntityFrameworkCoreModule.cs
+++ b/modules/identityserver/test/Volo.Abp.IdentityServer.EntityFrameworkCore.Tests/Volo/Abp/IdentityServer/AbpIdentityServerTestEntityFrameworkCoreModule.cs
@@ -1,11 +1,12 @@
-using System;
+using Microsoft.Data.Sqlite;
using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.IdentityServer.EntityFrameworkCore;
using Volo.Abp.Modularity;
-using Volo.Abp.Uow;
namespace Volo.Abp.IdentityServer
{
@@ -18,22 +19,15 @@ namespace Volo.Abp.IdentityServer
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
- context.Services.AddEntityFrameworkInMemoryDatabase();
-
- var databaseName = Guid.NewGuid().ToString();
+ var sqliteConnection = CreateDatabaseAndGetConnection();
Configure(options =>
{
options.Configure(abpDbContextConfigurationContext =>
{
- abpDbContextConfigurationContext.DbContextOptions.UseInMemoryDatabase(databaseName);
+ abpDbContextConfigurationContext.DbContextOptions.UseSqlite(sqliteConnection);
});
});
-
- Configure(options =>
- {
- options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled; //EF in-memory database does not support transactions
- });
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
@@ -41,6 +35,22 @@ namespace Volo.Abp.IdentityServer
SeedTestData(context);
}
+ private static SqliteConnection CreateDatabaseAndGetConnection()
+ {
+ var connection = new SqliteConnection("Data Source=:memory:");
+ connection.Open();
+
+ new IdentityDbContext(
+ new DbContextOptionsBuilder().UseSqlite(connection).Options
+ ).GetService().CreateTables();
+
+ new IdentityServerDbContext(
+ new DbContextOptionsBuilder().UseSqlite(connection).Options
+ ).GetService().CreateTables();
+
+ return connection;
+ }
+
private static void SeedTestData(ApplicationInitializationContext context)
{
using (var scope = context.ServiceProvider.CreateScope())
diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.MongoDB.Tests/Volo.Abp.IdentityServer.MongoDB.Tests.csproj b/modules/identityserver/test/Volo.Abp.IdentityServer.MongoDB.Tests/Volo.Abp.IdentityServer.MongoDB.Tests.csproj
index 0565ad07fc..8bfbcf1e10 100644
--- a/modules/identityserver/test/Volo.Abp.IdentityServer.MongoDB.Tests/Volo.Abp.IdentityServer.MongoDB.Tests.csproj
+++ b/modules/identityserver/test/Volo.Abp.IdentityServer.MongoDB.Tests/Volo.Abp.IdentityServer.MongoDB.Tests.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.IdentityServer.MongoDB.Tests
Volo.Abp.IdentityServer.MongoDB.Tests
true
diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo.Abp.IdentityServer.TestBase.csproj b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo.Abp.IdentityServer.TestBase.csproj
index 60e1791280..ee0ea3eca9 100644
--- a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo.Abp.IdentityServer.TestBase.csproj
+++ b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo.Abp.IdentityServer.TestBase.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.IdentityServer.TestBase
Volo.Abp.IdentityServer.TestBase
true
diff --git a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs
index 016820af49..f86d060d5b 100644
--- a/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs
+++ b/modules/identityserver/test/Volo.Abp.IdentityServer.TestBase/Volo/Abp/IdentityServer/AbpIdentityServerTestDataBuilder.cs
@@ -51,22 +51,29 @@ namespace Volo.Abp.IdentityServer
{
_persistentGrantRepository.Insert(new PersistedGrant(_guidGenerator.Create())
{
-
Key = "PersistedGrantKey1",
SubjectId = "PersistedGrantSubjectId1",
ClientId = "PersistedGrantClientId1",
- Type = "PersistedGrantType1"
+ Type = "PersistedGrantType1",
+ Data = ""
});
+
_persistentGrantRepository.Insert(new PersistedGrant(_guidGenerator.Create())
{
Key = "PersistedGrantKey2",
- SubjectId = "PersistedGrantSubjectId2"
+ SubjectId = "PersistedGrantSubjectId2",
+ ClientId = "c1",
+ Type = "c1type",
+ Data = ""
});
_persistentGrantRepository.Insert(new PersistedGrant(_guidGenerator.Create())
{
Key = "PersistedGrantKey3",
- SubjectId = "PersistedGrantSubjectId3"
+ SubjectId = "PersistedGrantSubjectId3",
+ ClientId = "c1",
+ Type = "c1type",
+ Data = ""
});
}
diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/Volo.Abp.PermissionManagement.Domain.Shared.csproj b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/Volo.Abp.PermissionManagement.Domain.Shared.csproj
index 300065764f..fd4d602045 100644
--- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/Volo.Abp.PermissionManagement.Domain.Shared.csproj
+++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Domain.Shared/Volo.Abp.PermissionManagement.Domain.Shared.csproj
@@ -15,9 +15,6 @@
-
-
-
diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo.Abp.PermissionManagement.EntityFrameworkCore.csproj b/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo.Abp.PermissionManagement.EntityFrameworkCore.csproj
index dd65cffbea..c13b3da80b 100644
--- a/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo.Abp.PermissionManagement.EntityFrameworkCore.csproj
+++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.EntityFrameworkCore/Volo.Abp.PermissionManagement.EntityFrameworkCore.csproj
@@ -1,9 +1,9 @@
-
+
- netstandard2.0
+ netstandard2.1
Volo.Abp.PermissionManagement.EntityFrameworkCore
Volo.Abp.PermissionManagement.EntityFrameworkCore
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
@@ -15,7 +15,6 @@
-
diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/Volo.Abp.PermissionManagement.HttpApi.Client.csproj b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/Volo.Abp.PermissionManagement.HttpApi.Client.csproj
index 4a719f72c3..0b0cfa49ca 100644
--- a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/Volo.Abp.PermissionManagement.HttpApi.Client.csproj
+++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi.Client/Volo.Abp.PermissionManagement.HttpApi.Client.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.PermissionManagement.HttpApi.Client
Volo.Abp.PermissionManagement.HttpApi.Client
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi/Volo.Abp.PermissionManagement.HttpApi.csproj b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi/Volo.Abp.PermissionManagement.HttpApi.csproj
index d650ca2e06..88f98c7eef 100644
--- a/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi/Volo.Abp.PermissionManagement.HttpApi.csproj
+++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.HttpApi/Volo.Abp.PermissionManagement.HttpApi.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.PermissionManagement.HttpApi
Volo.Abp.PermissionManagement.HttpApi
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo.Abp.PermissionManagement.MongoDB.csproj b/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo.Abp.PermissionManagement.MongoDB.csproj
index ed623b39d1..53ad2adde2 100644
--- a/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo.Abp.PermissionManagement.MongoDB.csproj
+++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.MongoDB/Volo.Abp.PermissionManagement.MongoDB.csproj
@@ -1,4 +1,4 @@
-
+
@@ -15,7 +15,6 @@
-
diff --git a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Volo.Abp.PermissionManagement.Web.csproj b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Volo.Abp.PermissionManagement.Web.csproj
index 820d477af3..b501ab1a71 100644
--- a/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Volo.Abp.PermissionManagement.Web.csproj
+++ b/modules/permission-management/src/Volo.Abp.PermissionManagement.Web/Volo.Abp.PermissionManagement.Web.csproj
@@ -3,12 +3,12 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.PermissionManagement.Web
Volo.Abp.PermissionManagement.Web
- true
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
Library
+ true
diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.Application.Tests/Volo.Abp.PermissionManagement.Application.Tests.csproj b/modules/permission-management/test/Volo.Abp.PermissionManagement.Application.Tests/Volo.Abp.PermissionManagement.Application.Tests.csproj
index 7e817abf24..cf445a30ef 100644
--- a/modules/permission-management/test/Volo.Abp.PermissionManagement.Application.Tests/Volo.Abp.PermissionManagement.Application.Tests.csproj
+++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.Application.Tests/Volo.Abp.PermissionManagement.Application.Tests.csproj
@@ -1,13 +1,11 @@
- netcoreapp2.2
-
- false
+ netcoreapp3.0
-
+
diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests.csproj b/modules/permission-management/test/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests.csproj
index c31040474a..82a992f016 100644
--- a/modules/permission-management/test/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests.csproj
+++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests/Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests
Volo.Abp.PermissionManagement.EntityFrameworkCore.Tests
true
@@ -17,8 +17,8 @@
-
-
+
+
\ No newline at end of file
diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.MongoDB.Tests/Volo.Abp.PermissionManagement.MongoDB.Tests.csproj b/modules/permission-management/test/Volo.Abp.PermissionManagement.MongoDB.Tests/Volo.Abp.PermissionManagement.MongoDB.Tests.csproj
index 47932e4c38..d9552b8639 100644
--- a/modules/permission-management/test/Volo.Abp.PermissionManagement.MongoDB.Tests/Volo.Abp.PermissionManagement.MongoDB.Tests.csproj
+++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.MongoDB.Tests/Volo.Abp.PermissionManagement.MongoDB.Tests.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.PermissionManagement.MongoDB.Tests
Volo.Abp.PermissionManagement.MongoDB.Tests
true
@@ -17,8 +17,8 @@
-
-
+
+
\ No newline at end of file
diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.TestBase/Volo.Abp.PermissionManagement.TestBase.csproj b/modules/permission-management/test/Volo.Abp.PermissionManagement.TestBase/Volo.Abp.PermissionManagement.TestBase.csproj
index e4fe696695..9a9dffc2eb 100644
--- a/modules/permission-management/test/Volo.Abp.PermissionManagement.TestBase/Volo.Abp.PermissionManagement.TestBase.csproj
+++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.TestBase/Volo.Abp.PermissionManagement.TestBase.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.PermissionManagement.TestBase
Volo.Abp.PermissionManagement.TestBase
true
@@ -18,7 +18,7 @@
-
+
diff --git a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo.Abp.PermissionManagement.Tests.csproj b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo.Abp.PermissionManagement.Tests.csproj
index b4ecce9e40..66b323fa32 100644
--- a/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo.Abp.PermissionManagement.Tests.csproj
+++ b/modules/permission-management/test/Volo.Abp.PermissionManagement.Tests/Volo.Abp.PermissionManagement.Tests.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.PermissionManagement.Tests
Volo.Abp.PermissionManagement.Tests
true
@@ -17,8 +17,8 @@
-
-
+
+
\ No newline at end of file
diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo.Abp.SettingManagement.Domain.Shared.csproj b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo.Abp.SettingManagement.Domain.Shared.csproj
index a7ba339c3e..8de8ec1923 100644
--- a/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo.Abp.SettingManagement.Domain.Shared.csproj
+++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Domain.Shared/Volo.Abp.SettingManagement.Domain.Shared.csproj
@@ -13,12 +13,9 @@
-
-
-
-
+
diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo.Abp.SettingManagement.EntityFrameworkCore.csproj b/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo.Abp.SettingManagement.EntityFrameworkCore.csproj
index 0261b31704..f5e1761cc5 100644
--- a/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo.Abp.SettingManagement.EntityFrameworkCore.csproj
+++ b/modules/setting-management/src/Volo.Abp.SettingManagement.EntityFrameworkCore/Volo.Abp.SettingManagement.EntityFrameworkCore.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netstandard2.1
Volo.Abp.SettingManagement.EntityFrameworkCore
Volo.Abp.SettingManagement.EntityFrameworkCore
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
@@ -15,7 +15,6 @@
-
diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo.Abp.SettingManagement.MongoDB.csproj b/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo.Abp.SettingManagement.MongoDB.csproj
index 0f86335627..8f068d1f12 100644
--- a/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo.Abp.SettingManagement.MongoDB.csproj
+++ b/modules/setting-management/src/Volo.Abp.SettingManagement.MongoDB/Volo.Abp.SettingManagement.MongoDB.csproj
@@ -15,7 +15,6 @@
-
diff --git a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Volo.Abp.SettingManagement.Web.csproj b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Volo.Abp.SettingManagement.Web.csproj
index 3361037ae1..59d35e028e 100644
--- a/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Volo.Abp.SettingManagement.Web.csproj
+++ b/modules/setting-management/src/Volo.Abp.SettingManagement.Web/Volo.Abp.SettingManagement.Web.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
Library
true
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
@@ -19,10 +19,9 @@
-
-
-
-
+
+
+
diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests.csproj b/modules/setting-management/test/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests.csproj
index 53ff012ea6..318f1135e3 100644
--- a/modules/setting-management/test/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests.csproj
+++ b/modules/setting-management/test/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests/Volo.Abp.SettingManagement.EntityFrameworkCore.Tests.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.SettingManagement.EntityFrameworkCore.Tests
Volo.Abp.SettingManagement.EntityFrameworkCore.Tests
true
@@ -17,9 +17,9 @@
-
-
-
+
+
+
diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.MongoDB.Tests/Volo.Abp.SettingManagement.MongoDB.Tests.csproj b/modules/setting-management/test/Volo.Abp.SettingManagement.MongoDB.Tests/Volo.Abp.SettingManagement.MongoDB.Tests.csproj
index bec724072d..ecb74b4710 100644
--- a/modules/setting-management/test/Volo.Abp.SettingManagement.MongoDB.Tests/Volo.Abp.SettingManagement.MongoDB.Tests.csproj
+++ b/modules/setting-management/test/Volo.Abp.SettingManagement.MongoDB.Tests/Volo.Abp.SettingManagement.MongoDB.Tests.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.SettingManagement.MongoDB.Tests
Volo.Abp.SettingManagement.MongoDB.Tests
true
@@ -17,8 +17,8 @@
-
-
+
+
diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo.Abp.SettingManagement.TestBase.csproj b/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo.Abp.SettingManagement.TestBase.csproj
index 71919bfbbc..a5c7f139fe 100644
--- a/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo.Abp.SettingManagement.TestBase.csproj
+++ b/modules/setting-management/test/Volo.Abp.SettingManagement.TestBase/Volo.Abp.SettingManagement.TestBase.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.SettingManagement.TestBase
Volo.Abp.SettingManagement.TestBase
true
@@ -18,7 +18,7 @@
-
+
diff --git a/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo.Abp.SettingManagement.Tests.csproj b/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo.Abp.SettingManagement.Tests.csproj
index b73f434279..908d633863 100644
--- a/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo.Abp.SettingManagement.Tests.csproj
+++ b/modules/setting-management/test/Volo.Abp.SettingManagement.Tests/Volo.Abp.SettingManagement.Tests.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.SettingManagement.Tests
Volo.Abp.SettingManagement.Tests
true
@@ -12,14 +12,12 @@
-
-
-
+
diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo.Abp.TenantManagement.Application.Contracts.csproj b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo.Abp.TenantManagement.Application.Contracts.csproj
index f99d3f8609..57f177df96 100644
--- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo.Abp.TenantManagement.Application.Contracts.csproj
+++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo.Abp.TenantManagement.Application.Contracts.csproj
@@ -18,8 +18,4 @@
-
-
-
-
diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/AbpTenantManagementApplicationContractsModule.cs b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/AbpTenantManagementApplicationContractsModule.cs
index 9ca2c82bdb..deef6f17cd 100644
--- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/AbpTenantManagementApplicationContractsModule.cs
+++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/AbpTenantManagementApplicationContractsModule.cs
@@ -1,28 +1,13 @@
using Volo.Abp.Application;
-using Volo.Abp.Localization;
using Volo.Abp.Modularity;
-using Volo.Abp.TenantManagement.Localization;
-using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.TenantManagement
{
- [DependsOn(typeof(AbpDddApplicationModule))]
- [DependsOn(typeof(AbpTenantManagementDomainSharedModule))]
+ [DependsOn(
+ typeof(AbpDddApplicationModule),
+ typeof(AbpTenantManagementDomainSharedModule))]
public class AbpTenantManagementApplicationContractsModule : AbpModule
{
- public override void ConfigureServices(ServiceConfigurationContext context)
- {
- Configure(options =>
- {
- options.FileSets.AddEmbedded();
- });
- Configure(options =>
- {
- options.Resources
- .Get()
- .AddVirtualJson("/Volo/Abp/TenantManagement/Localization/ApplicationContracts");
- });
- }
}
}
\ No newline at end of file
diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/cs.json b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/cs.json
deleted file mode 100644
index 415294c34a..0000000000
--- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/cs.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "culture": "cs",
- "texts": {
- "Permission:TenantManagement": "Správa tenantů",
- "Permission:Create": "Vytvořit",
- "Permission:Edit": "Upravit",
- "Permission:Delete": "Smazat",
- "Permission:ManageConnectionStrings": "Spravovat connection stringy",
- "Permission:ManageFeatures": "Spravovat funkce"
- }
-}
\ No newline at end of file
diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/en.json b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/en.json
deleted file mode 100644
index 5107cd269b..0000000000
--- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/en.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "culture": "en",
- "texts": {
- "Permission:TenantManagement": "Tenant management",
- "Permission:Create": "Create",
- "Permission:Edit": "Edit",
- "Permission:Delete": "Delete",
- "Permission:ManageConnectionStrings": "Manage connection strings",
- "Permission:ManageFeatures": "Manage features"
- }
-}
\ No newline at end of file
diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/pl.json b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/pl.json
deleted file mode 100644
index 500b784dfd..0000000000
--- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/pl.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "culture": "pl",
- "texts": {
- "Permission:TenantManagement": "Zarządzanie tenantami",
- "Permission:Create": "Utwórz",
- "Permission:Edit": "Edytuj",
- "Permission:Delete": "Usuń",
- "Permission:ManageConnectionStrings": "Zarządzaj connection string'ami",
- "Permission:ManageFeatures": "Zarządzaj fukcjami"
- }
-}
\ No newline at end of file
diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/pt-BR.json b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/pt-BR.json
deleted file mode 100644
index 6631be849a..0000000000
--- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/pt-BR.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "culture": "pt-BR",
- "texts": {
- "Permission:TenantManagement": "Inquilinos",
- "Permission:Create": "Criar",
- "Permission:Edit": "Editar",
- "Permission:Delete": "Excluir",
- "Permission:ManageConnectionStrings": "Gerenciar conexões (connection strings)",
- "Permission:ManageFeatures": "Gerenciar Funcionalidades"
- }
-}
\ No newline at end of file
diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/tr.json b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/tr.json
deleted file mode 100644
index d745a400c3..0000000000
--- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/tr.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "culture": "tr",
- "texts": {
- "Permission:TenantManagement": "Müşteri yönetimi",
- "Permission:Create": "Oluşturma",
- "Permission:Edit": "Düzenleme",
- "Permission:Delete": "Silme",
- "Permission:ManageConnectionStrings": "Bağlantı cümlelerini yönet",
- "Permission:ManageFeatures": "Özellikleri yönet"
- }
-}
\ No newline at end of file
diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/vi.json b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/vi.json
deleted file mode 100644
index 3518883435..0000000000
--- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/vi.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "culture": "vi",
- "texts": {
- "Permission:TenantManagement": "Quản lý khách thuê",
- "Permission:Create": "Tạo",
- "Permission:Edit": "Sửa",
- "Permission:Delete": "Xóa",
- "Permission:ManageConnectionStrings": "Quản lý chuỗi kết nối",
- "Permission:ManageFeatures": "Quản lý các tính năng"
- }
-}
diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/zh-Hans.json b/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/zh-Hans.json
deleted file mode 100644
index ca1c428755..0000000000
--- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Application.Contracts/Volo/Abp/TenantManagement/Localization/ApplicationContracts/zh-Hans.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "culture": "zh-Hans",
- "texts": {
- "Permission:TenantManagement": "租户管理",
- "Permission:Create": "创建",
- "Permission:Edit": "编辑",
- "Permission:Delete": "删除",
- "Permission:ManageConnectionStrings": "管理连接字符串",
- "Permission:ManageFeatures": "管理功能"
- }
- }
\ No newline at end of file
diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo.Abp.TenantManagement.Domain.Shared.csproj b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo.Abp.TenantManagement.Domain.Shared.csproj
index 81c0265dd8..dec1cabd46 100644
--- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo.Abp.TenantManagement.Domain.Shared.csproj
+++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo.Abp.TenantManagement.Domain.Shared.csproj
@@ -13,14 +13,11 @@
-
-
-
-
+
-
+
diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/cs.json b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/cs.json
index df819c5798..16f967139f 100644
--- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/cs.json
+++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/cs.json
@@ -9,6 +9,12 @@
"TenantDeletionConfirmationMessage": "Tenant '{0}' bude smazán. Jste si jistí?",
"ConnectionStrings": "Connection stringy",
"DisplayName:DefaultConnectionString": "Výchozí connection string",
- "DisplayName:UseSharedDatabase": "Použít sdílenou databázi"
+ "DisplayName:UseSharedDatabase": "Použít sdílenou databázi",
+ "Permission:TenantManagement": "Správa tenantů",
+ "Permission:Create": "Vytvořit",
+ "Permission:Edit": "Upravit",
+ "Permission:Delete": "Smazat",
+ "Permission:ManageConnectionStrings": "Spravovat connection stringy",
+ "Permission:ManageFeatures": "Spravovat funkce"
}
}
\ No newline at end of file
diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/en.json b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/en.json
index f38deeea89..fc51f00750 100644
--- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/en.json
+++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/en.json
@@ -9,6 +9,12 @@
"TenantDeletionConfirmationMessage": "Tenant '{0}' will be deleted. Do you confirm that?",
"ConnectionStrings": "Connection Strings",
"DisplayName:DefaultConnectionString": "Default Connection String",
- "DisplayName:UseSharedDatabase": "Use the Shared Database"
+ "DisplayName:UseSharedDatabase": "Use the Shared Database",
+ "Permission:TenantManagement": "Tenant management",
+ "Permission:Create": "Create",
+ "Permission:Edit": "Edit",
+ "Permission:Delete": "Delete",
+ "Permission:ManageConnectionStrings": "Manage connection strings",
+ "Permission:ManageFeatures": "Manage features"
}
}
\ No newline at end of file
diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/pl.json b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/pl.json
index 537d235293..18891c3633 100644
--- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/pl.json
+++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/pl.json
@@ -9,6 +9,12 @@
"TenantDeletionConfirmationMessage": "Tenant '{0}' zostanie usunięty. Czy na pewno?",
"ConnectionStrings": "Connection Strings",
"DisplayName:DefaultConnectionString": "Domyślny Connection String",
- "DisplayName:UseSharedDatabase": "Użyj współdzielonej bazy danych"
+ "DisplayName:UseSharedDatabase": "Użyj współdzielonej bazy danych",
+ "Permission:TenantManagement": "Zarządzanie tenantami",
+ "Permission:Create": "Utwórz",
+ "Permission:Edit": "Edytuj",
+ "Permission:Delete": "Usuń",
+ "Permission:ManageConnectionStrings": "Zarządzaj connection string'ami",
+ "Permission:ManageFeatures": "Zarządzaj fukcjami"
}
}
\ No newline at end of file
diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/pt-BR.json b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/pt-BR.json
index 95f87d2d7b..13d26b1b47 100644
--- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/pt-BR.json
+++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/pt-BR.json
@@ -9,6 +9,12 @@
"TenantDeletionConfirmationMessage": "Inquilino '{0}' será excluído. Tem certeza?",
"ConnectionStrings": "String de Conexão",
"DisplayName:DefaultConnectionString": "String de Conexão Padrão",
- "DisplayName:UseSharedDatabase": "Use o banco de dados compartilhado"
+ "DisplayName:UseSharedDatabase": "Use o banco de dados compartilhado",
+ "Permission:TenantManagement": "Inquilinos",
+ "Permission:Create": "Criar",
+ "Permission:Edit": "Editar",
+ "Permission:Delete": "Excluir",
+ "Permission:ManageConnectionStrings": "Gerenciar conexões (connection strings)",
+ "Permission:ManageFeatures": "Gerenciar Funcionalidades"
}
}
\ No newline at end of file
diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/tr.json b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/tr.json
index a3d40067f7..1b6bdca2c2 100644
--- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/tr.json
+++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/tr.json
@@ -9,6 +9,12 @@
"TenantDeletionConfirmationMessage": "'{0}' isimli müşteri silinecektir. Onaylıyor musunuz?",
"ConnectionStrings": "Bağlantı cümlesi",
"DisplayName:DefaultConnectionString": "Varsayılan bağlantı cümlesi",
- "DisplayName:UseSharedDatabase": "Paylaşılan veritabanını kullan"
+ "DisplayName:UseSharedDatabase": "Paylaşılan veritabanını kullan",
+ "Permission:TenantManagement": "Müşteri yönetimi",
+ "Permission:Create": "Oluşturma",
+ "Permission:Edit": "Düzenleme",
+ "Permission:Delete": "Silme",
+ "Permission:ManageConnectionStrings": "Bağlantı cümlelerini yönet",
+ "Permission:ManageFeatures": "Özellikleri yönet"
}
}
\ No newline at end of file
diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/vi.json b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/vi.json
index 1818cbdffd..cedefb842f 100644
--- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/vi.json
+++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/vi.json
@@ -9,6 +9,12 @@
"TenantDeletionConfirmationMessage": "Người thuê '{0}' sẽ bị xóa. Bạn có xác nhận không?",
"ConnectionStrings": "Chuỗi kết nối",
"DisplayName:DefaultConnectionString": "Chuỗi kết nối mặc định",
- "DisplayName:UseSharedDatabase": "Sử dụng cơ sở dữ liệu dùng chung"
+ "DisplayName:UseSharedDatabase": "Sử dụng cơ sở dữ liệu dùng chung",
+ "Permission:TenantManagement": "Quản lý khách thuê",
+ "Permission:Create": "Tạo",
+ "Permission:Edit": "Sửa",
+ "Permission:Delete": "Xóa",
+ "Permission:ManageConnectionStrings": "Quản lý chuỗi kết nối",
+ "Permission:ManageFeatures": "Quản lý các tính năng"
}
}
diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/zh-Hans.json b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/zh-Hans.json
index da5951a7f4..b60c68e2e0 100644
--- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/zh-Hans.json
+++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Domain.Shared/Volo/Abp/TenantManagement/Localization/Resources/zh-Hans.json
@@ -9,6 +9,12 @@
"TenantDeletionConfirmationMessage": "租户 '{0}' 将被删除. 你确定吗?",
"ConnectionStrings": "连接字符串",
"DisplayName:DefaultConnectionString": "默认连接字符串",
- "DisplayName:UseSharedDatabase": "使用共享数据库"
+ "DisplayName:UseSharedDatabase": "使用共享数据库",
+ "Permission:TenantManagement": "租户管理",
+ "Permission:Create": "创建",
+ "Permission:Edit": "编辑",
+ "Permission:Delete": "删除",
+ "Permission:ManageConnectionStrings": "管理连接字符串",
+ "Permission:ManageFeatures": "管理功能"
}
}
\ No newline at end of file
diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo.Abp.TenantManagement.EntityFrameworkCore.csproj b/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo.Abp.TenantManagement.EntityFrameworkCore.csproj
index d83470ecf8..259f5e7a73 100644
--- a/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo.Abp.TenantManagement.EntityFrameworkCore.csproj
+++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.EntityFrameworkCore/Volo.Abp.TenantManagement.EntityFrameworkCore.csproj
@@ -1,9 +1,9 @@
-
+
- netstandard2.0
+ netstandard2.1
Volo.Abp.TenantManagement.EntityFrameworkCore
Volo.Abp.TenantManagement.EntityFrameworkCore
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
@@ -15,7 +15,6 @@
-
diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/Volo.Abp.TenantManagement.HttpApi.Client.csproj b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/Volo.Abp.TenantManagement.HttpApi.Client.csproj
index 7e473b1335..ad2458e35d 100644
--- a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/Volo.Abp.TenantManagement.HttpApi.Client.csproj
+++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi.Client/Volo.Abp.TenantManagement.HttpApi.Client.csproj
@@ -1,9 +1,9 @@
-
+
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.TenantManagement.HttpApi.Client
Volo.Abp.TenantManagement.HttpApi.Client
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
@@ -15,7 +15,6 @@
-
diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/Volo.Abp.TenantManagement.HttpApi.csproj b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/Volo.Abp.TenantManagement.HttpApi.csproj
index 28fb85137c..13d7ea68b8 100644
--- a/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/Volo.Abp.TenantManagement.HttpApi.csproj
+++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.HttpApi/Volo.Abp.TenantManagement.HttpApi.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.TenantManagement.HttpApi
Volo.Abp.TenantManagement.HttpApi
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo.Abp.TenantManagement.MongoDB.csproj b/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo.Abp.TenantManagement.MongoDB.csproj
index d55f759611..aa7c7f9340 100644
--- a/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo.Abp.TenantManagement.MongoDB.csproj
+++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.MongoDB/Volo.Abp.TenantManagement.MongoDB.csproj
@@ -1,4 +1,4 @@
-
+
@@ -15,7 +15,6 @@
-
diff --git a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Volo.Abp.TenantManagement.Web.csproj b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Volo.Abp.TenantManagement.Web.csproj
index 1bcf4f99a9..27f3944a26 100644
--- a/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Volo.Abp.TenantManagement.Web.csproj
+++ b/modules/tenant-management/src/Volo.Abp.TenantManagement.Web/Volo.Abp.TenantManagement.Web.csproj
@@ -3,7 +3,7 @@
- netstandard2.0
+ netcoreapp3.0
Volo.Abp.TenantManagement.Web
Volo.Abp.TenantManagement.Web
true
@@ -12,10 +12,9 @@
-
-
-
-
+
+
+
diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.Application.Tests/Volo.Abp.TenantManagement.Application.Tests.csproj b/modules/tenant-management/test/Volo.Abp.TenantManagement.Application.Tests/Volo.Abp.TenantManagement.Application.Tests.csproj
index 5363fb8365..93f9df3f28 100644
--- a/modules/tenant-management/test/Volo.Abp.TenantManagement.Application.Tests/Volo.Abp.TenantManagement.Application.Tests.csproj
+++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.Application.Tests/Volo.Abp.TenantManagement.Application.Tests.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.TenantManagement.Application.Tests
Volo.Abp.TenantManagement.Application.Tests
true
@@ -17,7 +17,7 @@
-
+
diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo.Abp.TenantManagement.Domain.Tests.csproj b/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo.Abp.TenantManagement.Domain.Tests.csproj
index 0993f200ea..1df4e17e3c 100644
--- a/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo.Abp.TenantManagement.Domain.Tests.csproj
+++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.Domain.Tests/Volo.Abp.TenantManagement.Domain.Tests.csproj
@@ -1,12 +1,12 @@
- netcoreapp2.2
+ netcoreapp3.0
-
+
diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests.csproj b/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests.csproj
index b1c51dbd86..4f4169d8f0 100644
--- a/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests.csproj
+++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.TenantManagement.EntityFrameworkCore.Tests
Volo.Abp.TenantManagement.EntityFrameworkCore.Tests
true
@@ -17,9 +17,9 @@
-
-
-
+
+
+
diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementEntityFrameworkCoreTestModule.cs b/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementEntityFrameworkCoreTestModule.cs
index fac45a1b9a..dd5d9f8ae2 100644
--- a/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementEntityFrameworkCoreTestModule.cs
+++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.EntityFrameworkCore.Tests/Volo/Abp/TenantManagement/EntityFrameworkCore/AbpTenantManagementEntityFrameworkCoreTestModule.cs
@@ -1,6 +1,8 @@
using System;
+using Microsoft.Data.Sqlite;
using Microsoft.EntityFrameworkCore;
-using Microsoft.Extensions.DependencyInjection;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Storage;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.Uow;
@@ -15,15 +17,13 @@ namespace Volo.Abp.TenantManagement.EntityFrameworkCore
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
- context.Services.AddEntityFrameworkInMemoryDatabase();
-
- var databaseName = Guid.NewGuid().ToString();
+ var sqliteConnection = CreateDatabaseAndGetConnection();
Configure(options =>
{
options.Configure(abpDbContextConfigurationContext =>
{
- abpDbContextConfigurationContext.DbContextOptions.UseInMemoryDatabase(databaseName);
+ abpDbContextConfigurationContext.DbContextOptions.UseSqlite(sqliteConnection);
});
});
@@ -32,5 +32,17 @@ namespace Volo.Abp.TenantManagement.EntityFrameworkCore
options.TransactionBehavior = UnitOfWorkTransactionBehavior.Disabled; //EF in-memory database does not support transactions
});
}
+
+ private static SqliteConnection CreateDatabaseAndGetConnection()
+ {
+ var connection = new SqliteConnection("Data Source=:memory:");
+ connection.Open();
+
+ new TenantManagementDbContext(
+ new DbContextOptionsBuilder().UseSqlite(connection).Options
+ ).GetService().CreateTables();
+
+ return connection;
+ }
}
}
diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.MongoDB.Tests/Volo.Abp.TenantManagement.MongoDB.Tests.csproj b/modules/tenant-management/test/Volo.Abp.TenantManagement.MongoDB.Tests/Volo.Abp.TenantManagement.MongoDB.Tests.csproj
index 5e7268131c..d659b29068 100644
--- a/modules/tenant-management/test/Volo.Abp.TenantManagement.MongoDB.Tests/Volo.Abp.TenantManagement.MongoDB.Tests.csproj
+++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.MongoDB.Tests/Volo.Abp.TenantManagement.MongoDB.Tests.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.TenantManagement.MongoDB.Tests
Volo.Abp.TenantManagement.MongoDB.Tests
true
@@ -17,8 +17,8 @@
-
-
+
+
diff --git a/modules/tenant-management/test/Volo.Abp.TenantManagement.TestBase/Volo.Abp.TenantManagement.TestBase.csproj b/modules/tenant-management/test/Volo.Abp.TenantManagement.TestBase/Volo.Abp.TenantManagement.TestBase.csproj
index 61473146ae..84bfb56b48 100644
--- a/modules/tenant-management/test/Volo.Abp.TenantManagement.TestBase/Volo.Abp.TenantManagement.TestBase.csproj
+++ b/modules/tenant-management/test/Volo.Abp.TenantManagement.TestBase/Volo.Abp.TenantManagement.TestBase.csproj
@@ -1,7 +1,7 @@
- netcoreapp2.2
+ netcoreapp3.0
Volo.Abp.TenantManagement.TestBase
Volo.Abp.TenantManagement.TestBase
true
@@ -18,7 +18,7 @@
-
+
diff --git a/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/Volo.Abp.Users.EntityFrameworkCore.csproj b/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/Volo.Abp.Users.EntityFrameworkCore.csproj
index 16617a7694..d70b92e1a4 100644
--- a/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/Volo.Abp.Users.EntityFrameworkCore.csproj
+++ b/modules/users/src/Volo.Abp.Users.EntityFrameworkCore/Volo.Abp.Users.EntityFrameworkCore.csproj
@@ -1,9 +1,9 @@
-
+
- netstandard2.0
+ netstandard2.1
Volo.Abp.Users.EntityFrameworkCore
Volo.Abp.Users.EntityFrameworkCore
$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;
diff --git a/modules/users/test/Volo.Abp.Users.MongoDB.Tests/Volo.Abp.Users.MongoDB.Tests.csproj b/modules/users/test/Volo.Abp.Users.MongoDB.Tests/Volo.Abp.Users.MongoDB.Tests.csproj
index a814f2ae47..2ba192fe5f 100644
--- a/modules/users/test/Volo.Abp.Users.MongoDB.Tests/Volo.Abp.Users.MongoDB.Tests.csproj
+++ b/modules/users/test/Volo.Abp.Users.MongoDB.Tests/Volo.Abp.Users.MongoDB.Tests.csproj
@@ -19,7 +19,7 @@
-
+
diff --git a/npm/ng-packs/packages/account/src/lib/services/account.service.ts b/npm/ng-packs/packages/account/src/lib/services/account.service.ts
index dc7693b693..ce90f7c6e0 100644
--- a/npm/ng-packs/packages/account/src/lib/services/account.service.ts
+++ b/npm/ng-packs/packages/account/src/lib/services/account.service.ts
@@ -12,7 +12,7 @@ export class AccountService {
findTenant(tenantName: string): Observable {
const request: Rest.Request = {
method: 'GET',
- url: `/api/abp/multi-tenancy/find-tenant/${tenantName}`,
+ url: `/api/abp/multi-tenancy/tenants/by-name/${tenantName}`,
};
return this.rest.request(request);
diff --git a/samples/BookStore-Modular/application/.gitattributes b/samples/BookStore-Modular/application/.gitattributes
new file mode 100644
index 0000000000..c941e52669
--- /dev/null
+++ b/samples/BookStore-Modular/application/.gitattributes
@@ -0,0 +1 @@
+**/wwwroot/libs/** linguist-vendored
diff --git a/samples/BookStore-Modular/application/.gitignore b/samples/BookStore-Modular/application/.gitignore
new file mode 100644
index 0000000000..e9ccd519eb
--- /dev/null
+++ b/samples/BookStore-Modular/application/.gitignore
@@ -0,0 +1,259 @@
+## Ignore Visual Studio temporary files, build results, and
+## files generated by popular Visual Studio add-ons.
+
+# User-specific files
+*.suo
+*.user
+*.userosscache
+*.sln.docstates
+
+# User-specific files (MonoDevelop/Xamarin Studio)
+*.userprefs
+
+# Build results
+[Dd]ebug/
+[Dd]ebugPublic/
+[Rr]elease/
+[Rr]eleases/
+x64/
+x86/
+bld/
+[Bb]in/
+[Oo]bj/
+[Ll]og/
+
+# Visual Studio 2015 cache/options directory
+.vs/
+# Uncomment if you have tasks that create the project's static files in wwwroot
+#wwwroot/
+
+# MSTest test Results
+[Tt]est[Rr]esult*/
+[Bb]uild[Ll]og.*
+
+# NUNIT
+*.VisualState.xml
+TestResult.xml
+
+# Build Results of an ATL Project
+[Dd]ebugPS/
+[Rr]eleasePS/
+dlldata.c
+
+# DNX
+project.lock.json
+artifacts/
+
+*_i.c
+*_p.c
+*_i.h
+*.ilk
+*.meta
+*.obj
+*.pch
+*.pdb
+*.pgc
+*.pgd
+*.rsp
+*.sbr
+*.tlb
+*.tli
+*.tlh
+*.tmp
+*.tmp_proj
+*.log
+*.vspscc
+*.vssscc
+.builds
+*.pidb
+*.svclog
+*.scc
+
+# Chutzpah Test files
+_Chutzpah*
+
+# Visual C++ cache files
+ipch/
+*.aps
+*.ncb
+*.opendb
+*.opensdf
+*.sdf
+*.cachefile
+*.VC.db
+*.VC.VC.opendb
+
+# Visual Studio profiler
+*.psess
+*.vsp
+*.vspx
+*.sap
+
+# TFS 2012 Local Workspace
+$tf/
+
+# Guidance Automation Toolkit
+*.gpState
+
+# ReSharper is a .NET coding add-in
+_ReSharper*/
+*.[Rr]e[Ss]harper
+*.DotSettings.user
+
+# JustCode is a .NET coding add-in
+.JustCode
+
+# TeamCity is a build add-in
+_TeamCity*
+
+# DotCover is a Code Coverage Tool
+*.dotCover
+
+# NCrunch
+_NCrunch_*
+.*crunch*.local.xml
+nCrunchTemp_*
+
+# MightyMoose
+*.mm.*
+AutoTest.Net/
+
+# Web workbench (sass)
+.sass-cache/
+
+# Installshield output folder
+[Ee]xpress/
+
+# DocProject is a documentation generator add-in
+DocProject/buildhelp/
+DocProject/Help/*.HxT
+DocProject/Help/*.HxC
+DocProject/Help/*.hhc
+DocProject/Help/*.hhk
+DocProject/Help/*.hhp
+DocProject/Help/Html2
+DocProject/Help/html
+
+# Click-Once directory
+publish/
+
+# Publish Web Output
+*.[Pp]ublish.xml
+*.azurePubxml
+# TODO: Comment the next line if you want to checkin your web deploy settings
+# but database connection strings (with potential passwords) will be unencrypted
+*.pubxml
+*.publishproj
+
+# Microsoft Azure Web App publish settings. Comment the next line if you want to
+# checkin your Azure Web App publish settings, but sensitive information contained
+# in these scripts will be unencrypted
+PublishScripts/
+
+# NuGet Packages
+*.nupkg
+# The packages folder can be ignored because of Package Restore
+**/packages/*
+# except build/, which is used as an MSBuild target.
+!**/packages/build/
+# Uncomment if necessary however generally it will be regenerated when needed
+#!**/packages/repositories.config
+# NuGet v3's project.json files produces more ignoreable files
+*.nuget.props
+*.nuget.targets
+
+# Microsoft Azure Build Output
+csx/
+*.build.csdef
+
+# Microsoft Azure Emulator
+ecf/
+rcf/
+
+# Windows Store app package directories and files
+AppPackages/
+BundleArtifacts/
+Package.StoreAssociation.xml
+_pkginfo.txt
+
+# Visual Studio cache files
+# files ending in .cache can be ignored
+*.[Cc]ache
+# but keep track of directories ending in .cache
+!*.[Cc]ache/
+
+# Others
+ClientBin/
+~$*
+*~
+*.dbmdl
+*.dbproj.schemaview
+*.pfx
+*.publishsettings
+node_modules/
+orleans.codegen.cs
+
+# Since there are multiple workflows, uncomment next line to ignore bower_components
+# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
+#bower_components/
+
+# RIA/Silverlight projects
+Generated_Code/
+
+# Backup & report files from converting an old project file
+# to a newer Visual Studio version. Backup files are not needed,
+# because we have git ;-)
+_UpgradeReport_Files/
+Backup*/
+UpgradeLog*.XML
+UpgradeLog*.htm
+
+# SQL Server files
+*.mdf
+*.ldf
+
+# Business Intelligence projects
+*.rdl.data
+*.bim.layout
+*.bim_*.settings
+
+# Microsoft Fakes
+FakesAssemblies/
+
+# GhostDoc plugin setting file
+*.GhostDoc.xml
+
+# Node.js Tools for Visual Studio
+.ntvs_analysis.dat
+
+# Visual Studio 6 build log
+*.plg
+
+# Visual Studio 6 workspace options file
+*.opt
+
+# Visual Studio LightSwitch build output
+**/*.HTMLClient/GeneratedArtifacts
+**/*.DesktopClient/GeneratedArtifacts
+**/*.DesktopClient/ModelManifest.xml
+**/*.Server/GeneratedArtifacts
+**/*.Server/ModelManifest.xml
+_Pvt_Extensions
+
+# Paket dependency manager
+.paket/paket.exe
+paket-files/
+
+# FAKE - F# Make
+.fake/
+
+# JetBrains Rider
+.idea/
+*.sln.iml
+
+# BookStore
+src/Acme.BookStore.Web/Logs/*
+src/Acme.BookStore.Web.Host/Logs/*
+src/Acme.BookStore.IdentityServer/Logs/*
+src/Acme.BookStore.HttpApi.Host/Logs/*
+src/Acme.BookStore.HttpApi.HostWithIds/Logs/*
\ No newline at end of file
diff --git a/samples/BookStore-Modular/application/Acme.BookStore.sln b/samples/BookStore-Modular/application/Acme.BookStore.sln
new file mode 100644
index 0000000000..5750b0dbef
--- /dev/null
+++ b/samples/BookStore-Modular/application/Acme.BookStore.sln
@@ -0,0 +1,137 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.29020.237
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Domain", "src\Acme.BookStore.Domain\Acme.BookStore.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Application", "src\Acme.BookStore.Application\Acme.BookStore.Application.csproj", "{1A94A50E-06DC-43C1-80B5-B662820EC3EB}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.EntityFrameworkCore", "src\Acme.BookStore.EntityFrameworkCore\Acme.BookStore.EntityFrameworkCore.csproj", "{C956DD76-69C8-4A9C-83EA-D17DF83340FD}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Web", "src\Acme.BookStore.Web\Acme.BookStore.Web.csproj", "{068855E8-9240-4F1A-910B-CF825794513B}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CA9AC87F-097E-4F15-8393-4BC07735A5B0}"
+EndProject
+Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{04DBDB01-70F4-4E06-B468-8F87850B22BE}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Application.Tests", "test\Acme.BookStore.Application.Tests\Acme.BookStore.Application.Tests.csproj", "{50B2631D-129C-47B3-A587-029CCD6099BC}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Web.Tests", "test\Acme.BookStore.Web.Tests\Acme.BookStore.Web.Tests.csproj", "{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.EntityFrameworkCore.DbMigrations", "src\Acme.BookStore.EntityFrameworkCore.DbMigrations\Acme.BookStore.EntityFrameworkCore.DbMigrations.csproj", "{0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Domain.Shared", "src\Acme.BookStore.Domain.Shared\Acme.BookStore.Domain.Shared.csproj", "{42F719ED-8413-4895-B5B4-5AB56079BC66}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Application.Contracts", "src\Acme.BookStore.Application.Contracts\Acme.BookStore.Application.Contracts.csproj", "{520659C8-C734-4298-A3DA-B539DB9DFC0B}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.HttpApi", "src\Acme.BookStore.HttpApi\Acme.BookStore.HttpApi.csproj", "{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.HttpApi.Client", "src\Acme.BookStore.HttpApi.Client\Acme.BookStore.HttpApi.Client.csproj", "{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.EntityFrameworkCore.Tests", "test\Acme.BookStore.EntityFrameworkCore.Tests\Acme.BookStore.EntityFrameworkCore.Tests.csproj", "{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.TestBase", "test\Acme.BookStore.TestBase\Acme.BookStore.TestBase.csproj", "{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.Domain.Tests", "test\Acme.BookStore.Domain.Tests\Acme.BookStore.Domain.Tests.csproj", "{E512F4D9-9375-480F-A2F6-A46509F9D824}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.HttpApi.Client.ConsoleTestApp", "test\Acme.BookStore.HttpApi.Client.ConsoleTestApp\Acme.BookStore.HttpApi.Client.ConsoleTestApp.csproj", "{EF480016-9127-4916-8735-D2466BDBC582}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Acme.BookStore.DbMigrator", "src\Acme.BookStore.DbMigrator\Acme.BookStore.DbMigrator.csproj", "{AA94D832-1CCC-4715-95A9-A483F23A1A5D}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {068855E8-9240-4F1A-910B-CF825794513B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {068855E8-9240-4F1A-910B-CF825794513B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {068855E8-9240-4F1A-910B-CF825794513B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {068855E8-9240-4F1A-910B-CF825794513B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Release|Any CPU.Build.0 = Release|Any CPU
+ {0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0}.Release|Any CPU.Build.0 = Release|Any CPU
+ {42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.Build.0 = Release|Any CPU
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.Build.0 = Release|Any CPU
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.Build.0 = Release|Any CPU
+ {EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.Build.0 = Release|Any CPU
+ {AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(NestedProjects) = preSolution
+ {554AD327-6DBA-4F8F-96F8-81CE7A0C863F} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {1A94A50E-06DC-43C1-80B5-B662820EC3EB} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {C956DD76-69C8-4A9C-83EA-D17DF83340FD} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {068855E8-9240-4F1A-910B-CF825794513B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {50B2631D-129C-47B3-A587-029CCD6099BC} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {5F1B28C6-8D0C-4155-92D0-252F7EA5F674} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {0372FA84-C517-4EB3-9A9F-B9ACAC0CA5E0} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {42F719ED-8413-4895-B5B4-5AB56079BC66} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {520659C8-C734-4298-A3DA-B539DB9DFC0B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {4164BDF7-F527-4E85-9CE6-E3C2D7426A27} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {3B5A0094-670D-4BB1-BFDD-61B88A8773DC} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ {1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {91853F21-9CD9-4132-BC29-A7D5D84FFFE7} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {E512F4D9-9375-480F-A2F6-A46509F9D824} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {EF480016-9127-4916-8735-D2466BDBC582} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
+ {AA94D832-1CCC-4715-95A9-A483F23A1A5D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F}
+ EndGlobalSection
+EndGlobal
diff --git a/samples/BookStore-Modular/application/Acme.BookStore.sln.DotSettings b/samples/BookStore-Modular/application/Acme.BookStore.sln.DotSettings
new file mode 100644
index 0000000000..cb0b2c919f
--- /dev/null
+++ b/samples/BookStore-Modular/application/Acme.BookStore.sln.DotSettings
@@ -0,0 +1,23 @@
+
+ True
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ WARNING
+ Required
+ Required
+ Required
+ Required
+ False
+ True
+ False
+ False
+ True
+ False
+ False
+ SQL
+
\ No newline at end of file
diff --git a/samples/BookStore-Modular/application/common.props b/samples/BookStore-Modular/application/common.props
new file mode 100644
index 0000000000..7585f303ba
--- /dev/null
+++ b/samples/BookStore-Modular/application/common.props
@@ -0,0 +1,7 @@
+
+
+ latest
+ 1.0.0
+ $(NoWarn);CS1591
+
+
\ No newline at end of file
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Application.Contracts/Acme.BookStore.Application.Contracts.csproj b/samples/BookStore-Modular/application/src/Acme.BookStore.Application.Contracts/Acme.BookStore.Application.Contracts.csproj
new file mode 100644
index 0000000000..117321b755
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Application.Contracts/Acme.BookStore.Application.Contracts.csproj
@@ -0,0 +1,23 @@
+
+
+
+
+
+ netstandard2.0
+ Acme.BookStore
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Application.Contracts/BookStoreApplicationContractsModule.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.Application.Contracts/BookStoreApplicationContractsModule.cs
new file mode 100644
index 0000000000..2caf294e96
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Application.Contracts/BookStoreApplicationContractsModule.cs
@@ -0,0 +1,24 @@
+using Acme.BookStore.BookManagement;
+using Volo.Abp.Account;
+using Volo.Abp.FeatureManagement;
+using Volo.Abp.Identity;
+using Volo.Abp.Modularity;
+using Volo.Abp.PermissionManagement;
+using Volo.Abp.TenantManagement;
+
+namespace Acme.BookStore
+{
+ [DependsOn(
+ typeof(BookStoreDomainSharedModule),
+ typeof(AbpAccountApplicationContractsModule),
+ typeof(AbpFeatureManagementApplicationContractsModule),
+ typeof(AbpIdentityApplicationContractsModule),
+ typeof(AbpPermissionManagementApplicationContractsModule),
+ typeof(AbpTenantManagementApplicationContractsModule),
+ typeof(BookManagementApplicationContractsModule)
+ )]
+ public class BookStoreApplicationContractsModule : AbpModule
+ {
+
+ }
+}
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Application.Contracts/Permissions/BookStorePermissionDefinitionProvider.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.Application.Contracts/Permissions/BookStorePermissionDefinitionProvider.cs
new file mode 100644
index 0000000000..e189ca3743
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Application.Contracts/Permissions/BookStorePermissionDefinitionProvider.cs
@@ -0,0 +1,22 @@
+using Acme.BookStore.Localization;
+using Volo.Abp.Authorization.Permissions;
+using Volo.Abp.Localization;
+
+namespace Acme.BookStore.Permissions
+{
+ public class BookStorePermissionDefinitionProvider : PermissionDefinitionProvider
+ {
+ public override void Define(IPermissionDefinitionContext context)
+ {
+ var myGroup = context.AddGroup(BookStorePermissions.GroupName);
+
+ //Define your own permissions here. Example:
+ //myGroup.AddPermission(BookStorePermissions.MyPermission1, L("Permission:MyPermission1"));
+ }
+
+ private static LocalizableString L(string name)
+ {
+ return LocalizableString.Create(name);
+ }
+ }
+}
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Application.Contracts/Permissions/BookStorePermissions.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.Application.Contracts/Permissions/BookStorePermissions.cs
new file mode 100644
index 0000000000..b05c4883bd
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Application.Contracts/Permissions/BookStorePermissions.cs
@@ -0,0 +1,10 @@
+namespace Acme.BookStore.Permissions
+{
+ public static class BookStorePermissions
+ {
+ public const string GroupName = "BookStore";
+
+ //Add your own permission names. Example:
+ //public const string MyPermission1 = GroupName + ".MyPermission1";
+ }
+}
\ No newline at end of file
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Application/Acme.BookStore.Application.csproj b/samples/BookStore-Modular/application/src/Acme.BookStore.Application/Acme.BookStore.Application.csproj
new file mode 100644
index 0000000000..c720ac169c
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Application/Acme.BookStore.Application.csproj
@@ -0,0 +1,24 @@
+
+
+
+
+
+ netcoreapp2.2
+ Acme.BookStore
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Application/BookStoreAppService.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.Application/BookStoreAppService.cs
new file mode 100644
index 0000000000..06da155c39
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Application/BookStoreAppService.cs
@@ -0,0 +1,18 @@
+using System;
+using System.Collections.Generic;
+using System.Text;
+using Acme.BookStore.Localization;
+using Volo.Abp.Application.Services;
+
+namespace Acme.BookStore
+{
+ /* Inherit your application services from this class.
+ */
+ public abstract class BookStoreAppService : ApplicationService
+ {
+ protected BookStoreAppService()
+ {
+ LocalizationResource = typeof(BookStoreResource);
+ }
+ }
+}
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Application/BookStoreApplicationAutoMapperProfile.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.Application/BookStoreApplicationAutoMapperProfile.cs
new file mode 100644
index 0000000000..0706d83633
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Application/BookStoreApplicationAutoMapperProfile.cs
@@ -0,0 +1,14 @@
+using AutoMapper;
+
+namespace Acme.BookStore
+{
+ public class BookStoreApplicationAutoMapperProfile : Profile
+ {
+ public BookStoreApplicationAutoMapperProfile()
+ {
+ /* You can configure your AutoMapper mapping configuration here.
+ * Alternatively, you can split your mapping configurations
+ * into multiple profile classes for a better organization. */
+ }
+ }
+}
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Application/BookStoreApplicationModule.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.Application/BookStoreApplicationModule.cs
new file mode 100644
index 0000000000..3337e5deb4
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Application/BookStoreApplicationModule.cs
@@ -0,0 +1,36 @@
+using Acme.BookStore.BookManagement;
+using Volo.Abp.Account;
+using Volo.Abp.AutoMapper;
+using Volo.Abp.FeatureManagement;
+using Volo.Abp.Identity;
+using Volo.Abp.Modularity;
+using Volo.Abp.PermissionManagement;
+using Volo.Abp.TenantManagement;
+
+namespace Acme.BookStore
+{
+ [DependsOn(
+ typeof(BookStoreDomainModule),
+ typeof(AbpAccountApplicationModule),
+ typeof(BookStoreApplicationContractsModule),
+ typeof(AbpIdentityApplicationModule),
+ typeof(AbpPermissionManagementApplicationModule),
+ typeof(AbpTenantManagementApplicationModule),
+ typeof(AbpFeatureManagementApplicationModule),
+ typeof(BookManagementApplicationModule)
+ )]
+ public class BookStoreApplicationModule : AbpModule
+ {
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ Configure(options =>
+ {
+ /* Use `true` for the `validate` parameter if you want to
+ * validate the profile on application startup.
+ * See http://docs.automapper.org/en/stable/Configuration-validation.html for more info
+ * about the configuration validation. */
+ options.AddProfile();
+ });
+ }
+ }
+}
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/Acme.BookStore.DbMigrator.csproj b/samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/Acme.BookStore.DbMigrator.csproj
new file mode 100644
index 0000000000..b03c3f2227
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/Acme.BookStore.DbMigrator.csproj
@@ -0,0 +1,33 @@
+
+
+
+
+
+ Exe
+ netcoreapp2.2
+
+
+
+
+
+
+
+
+ PreserveNewest
+ Always
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/BookStoreDbMigratorModule.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/BookStoreDbMigratorModule.cs
new file mode 100644
index 0000000000..93309506ea
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/BookStoreDbMigratorModule.cs
@@ -0,0 +1,20 @@
+using Acme.BookStore.EntityFrameworkCore;
+using Volo.Abp.Autofac;
+using Volo.Abp.BackgroundJobs;
+using Volo.Abp.Modularity;
+
+namespace Acme.BookStore.DbMigrator
+{
+ [DependsOn(
+ typeof(AbpAutofacModule),
+ typeof(BookStoreEntityFrameworkCoreDbMigrationsModule),
+ typeof(BookStoreApplicationContractsModule)
+ )]
+ public class BookStoreDbMigratorModule : AbpModule
+ {
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ Configure(options => options.IsJobExecutionEnabled = false);
+ }
+ }
+}
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/Program.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/Program.cs
new file mode 100644
index 0000000000..d3c4034c8a
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/Program.cs
@@ -0,0 +1,53 @@
+using System.IO;
+using Microsoft.Extensions.DependencyInjection;
+using Acme.BookStore.Data;
+using Serilog;
+using Serilog.Events;
+using Volo.Abp;
+using Volo.Abp.Threading;
+
+namespace Acme.BookStore.DbMigrator
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ ConfigureLogging();
+
+ using (var application = AbpApplicationFactory.Create(options =>
+ {
+ options.UseAutofac();
+ options.Services.AddLogging(c => c.AddSerilog());
+ }))
+ {
+ application.Initialize();
+
+ AsyncHelper.RunSync(
+ () => application
+ .ServiceProvider
+ .GetRequiredService()
+ .MigrateAsync()
+ );
+
+ application.Shutdown();
+ }
+ }
+
+ private static void ConfigureLogging()
+ {
+ Log.Logger = new LoggerConfiguration()
+ .MinimumLevel.Information()
+ .MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
+ .MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning)
+#if DEBUG
+ .MinimumLevel.Override("Acme.BookStore", LogEventLevel.Debug)
+#else
+ .MinimumLevel.Override("Acme.BookStore", LogEventLevel.Information)
+#endif
+ .Enrich.FromLogContext()
+ .WriteTo.File(Path.Combine(Directory.GetCurrentDirectory(), "Logs/logs.txt"))
+ .WriteTo.Console()
+ .CreateLogger();
+ }
+ }
+}
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/appsettings.json b/samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/appsettings.json
new file mode 100644
index 0000000000..1a2d95c171
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.DbMigrator/appsettings.json
@@ -0,0 +1,18 @@
+{
+ "ConnectionStrings": {
+ "Default": "Server=localhost;Database=BookStore;Trusted_Connection=True;MultipleActiveResultSets=true"
+ },
+ "IdentityServer": {
+ "Clients": {
+ "BookStore_Web": {
+ "ClientId": "BookStore_Web",
+ "ClientSecret": "1q2w3e*",
+ "RootUrl": "https://localhost:44388"
+ },
+ "BookStore_App": {
+ "ClientId": "BookStore_App",
+ "ClientSecret": "1q2w3e*"
+ }
+ }
+ }
+}
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Acme.BookStore.Domain.Shared.csproj b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Acme.BookStore.Domain.Shared.csproj
new file mode 100644
index 0000000000..48263f2e6d
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Acme.BookStore.Domain.Shared.csproj
@@ -0,0 +1,27 @@
+
+
+
+
+
+ netstandard2.0
+ Acme.BookStore
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/BookStoreDomainErrorCodes.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/BookStoreDomainErrorCodes.cs
new file mode 100644
index 0000000000..30f124fbed
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/BookStoreDomainErrorCodes.cs
@@ -0,0 +1,7 @@
+namespace Acme.BookStore
+{
+ public static class BookStoreDomainErrorCodes
+ {
+ /* You can add your business exception error codes here, as constants */
+ }
+}
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/BookStoreDomainSharedModule.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/BookStoreDomainSharedModule.cs
new file mode 100644
index 0000000000..85cda77f69
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/BookStoreDomainSharedModule.cs
@@ -0,0 +1,47 @@
+using Acme.BookStore.BookManagement;
+using Acme.BookStore.Localization;
+using Volo.Abp.AuditLogging;
+using Volo.Abp.BackgroundJobs;
+using Volo.Abp.FeatureManagement;
+using Volo.Abp.Identity;
+using Volo.Abp.IdentityServer;
+using Volo.Abp.Localization;
+using Volo.Abp.Localization.Resources.AbpValidation;
+using Volo.Abp.Modularity;
+using Volo.Abp.PermissionManagement;
+using Volo.Abp.SettingManagement;
+using Volo.Abp.TenantManagement;
+using Volo.Abp.VirtualFileSystem;
+
+namespace Acme.BookStore
+{
+ [DependsOn(
+ typeof(AbpAuditLoggingDomainSharedModule),
+ typeof(BackgroundJobsDomainSharedModule),
+ typeof(AbpFeatureManagementDomainSharedModule),
+ typeof(AbpIdentityDomainSharedModule),
+ typeof(AbpIdentityServerDomainSharedModule),
+ typeof(AbpPermissionManagementDomainSharedModule),
+ typeof(AbpSettingManagementDomainSharedModule),
+ typeof(AbpTenantManagementDomainSharedModule),
+ typeof(BookManagementDomainSharedModule)
+ )]
+ public class BookStoreDomainSharedModule : AbpModule
+ {
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ Configure(options =>
+ {
+ options.FileSets.AddEmbedded("Acme.BookStore");
+ });
+
+ Configure(options =>
+ {
+ options.Resources
+ .Add("en")
+ .AddBaseTypes(typeof(AbpValidationResource))
+ .AddVirtualJson("/Localization/BookStore");
+ });
+ }
+ }
+}
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStore/cs.json b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStore/cs.json
new file mode 100644
index 0000000000..619521939c
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStore/cs.json
@@ -0,0 +1,8 @@
+{
+ "culture": "cs",
+ "texts": {
+ "Menu:Home": "Úvod",
+ "Welcome": "Vítejte",
+ "LongWelcomeMessage": "Vítejte v aplikaci. Toto je startovací projekt založený na ABP frameworku. Pro více informací, navštivte abp.io."
+ }
+}
\ No newline at end of file
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStore/en.json b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStore/en.json
new file mode 100644
index 0000000000..baa9fe753e
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStore/en.json
@@ -0,0 +1,8 @@
+{
+ "culture": "en",
+ "texts": {
+ "Menu:Home": "Home",
+ "Welcome": "Welcome",
+ "LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io."
+ }
+}
\ No newline at end of file
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStore/pl.json b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStore/pl.json
new file mode 100644
index 0000000000..815bbcc83f
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStore/pl.json
@@ -0,0 +1,8 @@
+{
+ "culture": "pl",
+ "texts": {
+ "Menu:Home": "Home",
+ "Welcome": "Witaj",
+ "LongWelcomeMessage": "Witaj w aplikacji. To jest inicjalny projekt bazujący na ABP framework. Po więcej informacji odwiedź stronę abp.io."
+ }
+}
\ No newline at end of file
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStore/pt-BR.json b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStore/pt-BR.json
new file mode 100644
index 0000000000..8c818a07af
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStore/pt-BR.json
@@ -0,0 +1,8 @@
+{
+ "culture": "pt-BR",
+ "texts": {
+ "Menu:Home": "Principal",
+ "Welcome": "Seja bem-vindo!",
+ "LongWelcomeMessage": "Bem-vindo a esta aplicação. Este é um projeto inicial baseado no ABP framework. Para mais informações, visite abp.io."
+ }
+}
\ No newline at end of file
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStore/tr.json b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStore/tr.json
new file mode 100644
index 0000000000..5bf83ee7a8
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStore/tr.json
@@ -0,0 +1,8 @@
+{
+ "culture": "tr",
+ "texts": {
+ "Menu:Home": "Ana sayfa",
+ "Welcome": "Hoşgeldiniz",
+ "LongWelcomeMessage": "Uygulamaya hoşgeldiniz. Bu, ABP framework'ü üzerine bina edilmiş bir başlangıç projesidir. Daha fazla bilgi için abp.io adresini ziyaret edebilirsiniz."
+ }
+}
\ No newline at end of file
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStore/vi.json b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStore/vi.json
new file mode 100644
index 0000000000..c115a35726
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStore/vi.json
@@ -0,0 +1,8 @@
+{
+ "culture": "vi",
+ "texts": {
+ "Menu:Home": "Trang chủ",
+ "Welcome": "Chào mừng bạn",
+ "LongWelcomeMessage": "Chào mừng bạn đến ứng dụng. Đây là một dự án khởi nghiệp dựa trên khung ABP. Để biết thêm thông tin, hãy truy cập abp.io."
+ }
+}
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStore/zh-Hans.json b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStore/zh-Hans.json
new file mode 100644
index 0000000000..459fc0fefd
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStore/zh-Hans.json
@@ -0,0 +1,8 @@
+{
+ "culture": "zh-Hans",
+ "texts": {
+ "Menu:Home": "首页",
+ "Welcome": "欢迎",
+ "LongWelcomeMessage": "欢迎来到该应用程序. 这是一个基于ABP框架的启动项目. 有关更多信息, 请访问 cn.abp.io."
+ }
+ }
\ No newline at end of file
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStoreResource.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStoreResource.cs
new file mode 100644
index 0000000000..cc4b935e58
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/Localization/BookStoreResource.cs
@@ -0,0 +1,10 @@
+using Volo.Abp.Localization;
+
+namespace Acme.BookStore.Localization
+{
+ [LocalizationResourceName("BookStore")]
+ public class BookStoreResource
+ {
+
+ }
+}
\ No newline at end of file
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/MultiTenancy/MultiTenancyConsts.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/MultiTenancy/MultiTenancyConsts.cs
new file mode 100644
index 0000000000..9ece5cc53e
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain.Shared/MultiTenancy/MultiTenancyConsts.cs
@@ -0,0 +1,11 @@
+namespace Acme.BookStore.MultiTenancy
+{
+ public static class MultiTenancyConsts
+ {
+ /* Enable/disable multi-tenancy easily in a single point.
+ * If you will never need to multi-tenancy, you can remove
+ * related modules and code parts, including this file.
+ */
+ public const bool IsEnabled = true;
+ }
+}
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/Acme.BookStore.Domain.csproj b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/Acme.BookStore.Domain.csproj
new file mode 100644
index 0000000000..4a24f3dbe1
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/Acme.BookStore.Domain.csproj
@@ -0,0 +1,28 @@
+
+
+
+
+
+ netcoreapp2.2
+ Acme.BookStore
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/BookStoreConsts.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/BookStoreConsts.cs
new file mode 100644
index 0000000000..96556e1b85
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/BookStoreConsts.cs
@@ -0,0 +1,9 @@
+namespace Acme.BookStore
+{
+ public static class BookStoreConsts
+ {
+ public const string DbTablePrefix = "App";
+
+ public const string DbSchema = null;
+ }
+}
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/BookStoreDomainModule.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/BookStoreDomainModule.cs
new file mode 100644
index 0000000000..5a3e1546f5
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/BookStoreDomainModule.cs
@@ -0,0 +1,40 @@
+using Acme.BookStore.MultiTenancy;
+using Volo.Abp.AuditLogging;
+using Volo.Abp.BackgroundJobs;
+using Volo.Abp.FeatureManagement;
+using Volo.Abp.Identity;
+using Volo.Abp.IdentityServer;
+using Volo.Abp.Modularity;
+using Volo.Abp.MultiTenancy;
+using Volo.Abp.PermissionManagement.Identity;
+using Volo.Abp.PermissionManagement.IdentityServer;
+using Volo.Abp.SettingManagement;
+using Volo.Abp.TenantManagement;
+using Acme.BookStore.BookManagement;
+
+namespace Acme.BookStore
+{
+ [DependsOn(
+ typeof(BookStoreDomainSharedModule),
+ typeof(AbpAuditLoggingDomainModule),
+ typeof(BackgroundJobsDomainModule),
+ typeof(AbpFeatureManagementDomainModule),
+ typeof(AbpIdentityDomainModule),
+ typeof(AbpPermissionManagementDomainIdentityModule),
+ typeof(AbpIdentityServerDomainModule),
+ typeof(AbpPermissionManagementDomainIdentityServerModule),
+ typeof(AbpSettingManagementDomainModule),
+ typeof(AbpTenantManagementDomainModule),
+ typeof(BookManagementDomainModule)
+ )]
+ public class BookStoreDomainModule : AbpModule
+ {
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ Configure(options =>
+ {
+ options.IsEnabled = MultiTenancyConsts.IsEnabled;
+ });
+ }
+ }
+}
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/Data/BookStoreDbMigrationService.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/Data/BookStoreDbMigrationService.cs
new file mode 100644
index 0000000000..4db6b4af83
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/Data/BookStoreDbMigrationService.cs
@@ -0,0 +1,39 @@
+using System.Threading.Tasks;
+using Microsoft.Extensions.Logging;
+using Microsoft.Extensions.Logging.Abstractions;
+using Volo.Abp.Data;
+using Volo.Abp.DependencyInjection;
+
+namespace Acme.BookStore.Data
+{
+ public class BookStoreDbMigrationService : ITransientDependency
+ {
+ public ILogger Logger { get; set; }
+
+ private readonly IDataSeeder _dataSeeder;
+ private readonly IBookStoreDbSchemaMigrator _dbSchemaMigrator;
+
+ public BookStoreDbMigrationService(
+ IDataSeeder dataSeeder,
+ IBookStoreDbSchemaMigrator dbSchemaMigrator)
+ {
+ _dataSeeder = dataSeeder;
+ _dbSchemaMigrator = dbSchemaMigrator;
+
+ Logger = NullLogger.Instance;
+ }
+
+ public async Task MigrateAsync()
+ {
+ Logger.LogInformation("Started database migrations...");
+
+ Logger.LogInformation("Migrating database schema...");
+ await _dbSchemaMigrator.MigrateAsync();
+
+ Logger.LogInformation("Executing database seed...");
+ await _dataSeeder.SeedAsync();
+
+ Logger.LogInformation("Successfully completed database migrations.");
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/Data/IBookStoreDbSchemaMigrator.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/Data/IBookStoreDbSchemaMigrator.cs
new file mode 100644
index 0000000000..5c94a6918e
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/Data/IBookStoreDbSchemaMigrator.cs
@@ -0,0 +1,9 @@
+using System.Threading.Tasks;
+
+namespace Acme.BookStore.Data
+{
+ public interface IBookStoreDbSchemaMigrator
+ {
+ Task MigrateAsync();
+ }
+}
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/Data/NullBookStoreDbSchemaMigrator.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/Data/NullBookStoreDbSchemaMigrator.cs
new file mode 100644
index 0000000000..f6ed8fc8de
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/Data/NullBookStoreDbSchemaMigrator.cs
@@ -0,0 +1,16 @@
+using System.Threading.Tasks;
+using Volo.Abp.DependencyInjection;
+
+namespace Acme.BookStore.Data
+{
+ /* This is used if database provider does't define
+ * IBookStoreDbSchemaMigrator implementation.
+ */
+ public class NullBookStoreDbSchemaMigrator : IBookStoreDbSchemaMigrator, ITransientDependency
+ {
+ public Task MigrateAsync()
+ {
+ return Task.CompletedTask;
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/IdentityServer/IdentityServerDataSeedContributor.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/IdentityServer/IdentityServerDataSeedContributor.cs
new file mode 100644
index 0000000000..3458a965ac
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/IdentityServer/IdentityServerDataSeedContributor.cs
@@ -0,0 +1,223 @@
+using System;
+using System.Collections.Generic;
+using System.Threading.Tasks;
+using IdentityServer4.Models;
+using Volo.Abp.Authorization.Permissions;
+using Volo.Abp.Configuration;
+using Volo.Abp.Data;
+using Volo.Abp.DependencyInjection;
+using Volo.Abp.Guids;
+using Volo.Abp.IdentityServer.ApiResources;
+using Volo.Abp.IdentityServer.Clients;
+using Volo.Abp.IdentityServer.IdentityResources;
+using Volo.Abp.PermissionManagement;
+using Volo.Abp.Uow;
+using ApiResource = Volo.Abp.IdentityServer.ApiResources.ApiResource;
+using Client = Volo.Abp.IdentityServer.Clients.Client;
+
+namespace Acme.BookStore.IdentityServer
+{
+ public class IdentityServerDataSeedContributor : IDataSeedContributor, ITransientDependency
+ {
+ private readonly IApiResourceRepository _apiResourceRepository;
+ private readonly IClientRepository _clientRepository;
+ private readonly IIdentityResourceDataSeeder _identityResourceDataSeeder;
+ private readonly IGuidGenerator _guidGenerator;
+ private readonly IPermissionDataSeeder _permissionDataSeeder;
+ private readonly IConfigurationAccessor _configurationAccessor;
+
+ public IdentityServerDataSeedContributor(
+ IClientRepository clientRepository,
+ IApiResourceRepository apiResourceRepository,
+ IIdentityResourceDataSeeder identityResourceDataSeeder,
+ IGuidGenerator guidGenerator,
+ IPermissionDataSeeder permissionDataSeeder,
+ IConfigurationAccessor configurationAccessor)
+ {
+ _clientRepository = clientRepository;
+ _apiResourceRepository = apiResourceRepository;
+ _identityResourceDataSeeder = identityResourceDataSeeder;
+ _guidGenerator = guidGenerator;
+ _permissionDataSeeder = permissionDataSeeder;
+ _configurationAccessor = configurationAccessor;
+ }
+
+ [UnitOfWork]
+ public virtual async Task SeedAsync(DataSeedContext context)
+ {
+ await _identityResourceDataSeeder.CreateStandardResourcesAsync();
+ await CreateApiResourcesAsync();
+ await CreateClientsAsync();
+ }
+
+ private async Task CreateApiResourcesAsync()
+ {
+ var commonApiUserClaims = new[]
+ {
+ "email",
+ "email_verified",
+ "name",
+ "phone_number",
+ "phone_number_verified",
+ "role"
+ };
+
+ await CreateApiResourceAsync("BookStore", commonApiUserClaims);
+ }
+
+ private async Task CreateApiResourceAsync(string name, IEnumerable claims)
+ {
+ var apiResource = await _apiResourceRepository.FindByNameAsync(name);
+ if (apiResource == null)
+ {
+ apiResource = await _apiResourceRepository.InsertAsync(
+ new ApiResource(
+ _guidGenerator.Create(),
+ name,
+ name + " API"
+ ),
+ autoSave: true
+ );
+ }
+
+ foreach (var claim in claims)
+ {
+ if (apiResource.FindClaim(claim) == null)
+ {
+ apiResource.AddUserClaim(claim);
+ }
+ }
+
+ return await _apiResourceRepository.UpdateAsync(apiResource);
+ }
+
+ private async Task CreateClientsAsync()
+ {
+ var commonScopes = new[]
+ {
+ "email",
+ "openid",
+ "profile",
+ "role",
+ "phone",
+ "address",
+ "BookStore"
+ };
+
+ var configurationSection = _configurationAccessor.Configuration.GetSection("IdentityServer:Clients");
+
+ //Web Client
+ var webClientId = configurationSection["BookStore_Web:ClientId"];
+ if (!webClientId.IsNullOrWhiteSpace())
+ {
+ var webClientRootUrl = configurationSection["BookStore_Web:RootUrl"].EnsureEndsWith('/');
+
+ /* BookStore_Web client is only needed if you created a tiered
+ * solution. Otherwise, you can delete this client. */
+
+ await CreateClientAsync(
+ webClientId,
+ commonScopes,
+ new[] { "hybrid" },
+ (configurationSection["BookStore_Web:ClientSecret"] ?? "1q2w3e*").Sha256(),
+ redirectUri: $"{webClientRootUrl}signin-oidc",
+ postLogoutRedirectUri: $"{webClientRootUrl}signout-callback-oidc"
+ );
+ }
+
+ //Console Test Client
+ var consoleClientId = configurationSection["BookStore_App:ClientId"];
+ if (!consoleClientId.IsNullOrWhiteSpace())
+ {
+ await CreateClientAsync(
+ consoleClientId,
+ commonScopes,
+ new[] { "password", "client_credentials" },
+ (configurationSection["BookStore_App:ClientSecret"] ?? "1q2w3e*").Sha256()
+ );
+ }
+ }
+
+ private async Task CreateClientAsync(
+ string name,
+ IEnumerable scopes,
+ IEnumerable grantTypes,
+ string secret,
+ string redirectUri = null,
+ string postLogoutRedirectUri = null,
+ IEnumerable permissions = null)
+ {
+ var client = await _clientRepository.FindByCliendIdAsync(name);
+ if (client == null)
+ {
+ client = await _clientRepository.InsertAsync(
+ new Client(
+ _guidGenerator.Create(),
+ name
+ )
+ {
+ ClientName = name,
+ ProtocolType = "oidc",
+ Description = name,
+ AlwaysIncludeUserClaimsInIdToken = true,
+ AllowOfflineAccess = true,
+ AbsoluteRefreshTokenLifetime = 31536000, //365 days
+ AccessTokenLifetime = 31536000, //365 days
+ AuthorizationCodeLifetime = 300,
+ IdentityTokenLifetime = 300,
+ RequireConsent = false
+ },
+ autoSave: true
+ );
+ }
+
+ foreach (var scope in scopes)
+ {
+ if (client.FindScope(scope) == null)
+ {
+ client.AddScope(scope);
+ }
+ }
+
+ foreach (var grantType in grantTypes)
+ {
+ if (client.FindGrantType(grantType) == null)
+ {
+ client.AddGrantType(grantType);
+ }
+ }
+
+ if (client.FindSecret(secret) == null)
+ {
+ client.AddSecret(secret);
+ }
+
+ if (redirectUri != null)
+ {
+ if (client.FindRedirectUri(redirectUri) == null)
+ {
+ client.AddRedirectUri(redirectUri);
+ }
+ }
+
+ if (postLogoutRedirectUri != null)
+ {
+ if (client.FindPostLogoutRedirectUri(postLogoutRedirectUri) == null)
+ {
+ client.AddPostLogoutRedirectUri(postLogoutRedirectUri);
+ }
+ }
+
+ if (permissions != null)
+ {
+ await _permissionDataSeeder.SeedAsync(
+ ClientPermissionValueProvider.ProviderName,
+ name,
+ permissions
+ );
+ }
+
+ return await _clientRepository.UpdateAsync(client);
+ }
+ }
+}
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/Settings/BookStoreSettingDefinitionProvider.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/Settings/BookStoreSettingDefinitionProvider.cs
new file mode 100644
index 0000000000..6527dbc91f
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/Settings/BookStoreSettingDefinitionProvider.cs
@@ -0,0 +1,13 @@
+using Volo.Abp.Settings;
+
+namespace Acme.BookStore.Settings
+{
+ public class BookStoreSettingDefinitionProvider : SettingDefinitionProvider
+ {
+ public override void Define(ISettingDefinitionContext context)
+ {
+ //Define your own settings here. Example:
+ //context.Add(new SettingDefinition(BookStoreSettings.MySetting1));
+ }
+ }
+}
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/Settings/BookStoreSettings.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/Settings/BookStoreSettings.cs
new file mode 100644
index 0000000000..7d5aa84d19
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/Settings/BookStoreSettings.cs
@@ -0,0 +1,10 @@
+namespace Acme.BookStore.Settings
+{
+ public static class BookStoreSettings
+ {
+ private const string Prefix = "BookStore";
+
+ //Add your own setting names here. Example:
+ //public const string MySetting1 = Prefix + ".MySetting1";
+ }
+}
\ No newline at end of file
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/Users/AppUser.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/Users/AppUser.cs
new file mode 100644
index 0000000000..9068cfbcd5
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.Domain/Users/AppUser.cs
@@ -0,0 +1,53 @@
+using System;
+using Volo.Abp.Domain.Entities.Auditing;
+using Volo.Abp.Users;
+
+namespace Acme.BookStore.Users
+{
+ /* This entity shares the same table/collection ("AbpUsers" by default) with the
+ * IdentityUser entity of the Identity module.
+ *
+ * - You can define your custom properties into this class.
+ * - You never create or delete this entity, because it is Identity module's job.
+ * - You can query users from database with this entity.
+ * - You can update values of your custom properties.
+ */
+ public class AppUser : FullAuditedAggregateRoot, IUser
+ {
+ #region Base properties
+
+ /* These properties are shared with the IdentityUser entity of the Identity module.
+ * Do not change these properties through this class. Instead, use Identity module
+ * services (like IdentityUserManager) to change them.
+ * So, this properties are designed as read only!
+ */
+
+ public virtual Guid? TenantId { get; private set; }
+
+ public virtual string UserName { get; private set; }
+
+ public virtual string Name { get; private set; }
+
+ public virtual string Surname { get; private set; }
+
+ public virtual string Email { get; private set; }
+
+ public virtual bool EmailConfirmed { get; private set; }
+
+ public virtual string PhoneNumber { get; private set; }
+
+ public virtual bool PhoneNumberConfirmed { get; private set; }
+
+ #endregion
+
+ /* Add your own properties here. Example:
+ *
+ * public virtual string MyProperty { get; set; }
+ */
+
+ private AppUser()
+ {
+
+ }
+ }
+}
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.EntityFrameworkCore.DbMigrations/Acme.BookStore.EntityFrameworkCore.DbMigrations.csproj b/samples/BookStore-Modular/application/src/Acme.BookStore.EntityFrameworkCore.DbMigrations/Acme.BookStore.EntityFrameworkCore.DbMigrations.csproj
new file mode 100644
index 0000000000..dde34ac3f7
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.EntityFrameworkCore.DbMigrations/Acme.BookStore.EntityFrameworkCore.DbMigrations.csproj
@@ -0,0 +1,18 @@
+
+
+
+
+
+ netcoreapp2.2
+ Acme.BookStore
+
+
+
+
+
+
+
+
+
+
+
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/BookStoreEntityFrameworkCoreDbMigrationsModule.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/BookStoreEntityFrameworkCoreDbMigrationsModule.cs
new file mode 100644
index 0000000000..88e21f2ce8
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/BookStoreEntityFrameworkCoreDbMigrationsModule.cs
@@ -0,0 +1,16 @@
+using Microsoft.Extensions.DependencyInjection;
+using Volo.Abp.Modularity;
+
+namespace Acme.BookStore.EntityFrameworkCore
+{
+ [DependsOn(
+ typeof(BookStoreEntityFrameworkCoreModule)
+ )]
+ public class BookStoreEntityFrameworkCoreDbMigrationsModule : AbpModule
+ {
+ public override void ConfigureServices(ServiceConfigurationContext context)
+ {
+ context.Services.AddAbpDbContext();
+ }
+ }
+}
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/BookStoreMigrationsDbContext.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/BookStoreMigrationsDbContext.cs
new file mode 100644
index 0000000000..6a74deef7e
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/BookStoreMigrationsDbContext.cs
@@ -0,0 +1,57 @@
+using Acme.BookStore.BookManagement.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore;
+using Volo.Abp.AuditLogging.EntityFrameworkCore;
+using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
+using Volo.Abp.EntityFrameworkCore;
+using Volo.Abp.FeatureManagement.EntityFrameworkCore;
+using Volo.Abp.Identity;
+using Volo.Abp.Identity.EntityFrameworkCore;
+using Volo.Abp.IdentityServer.EntityFrameworkCore;
+using Volo.Abp.PermissionManagement.EntityFrameworkCore;
+using Volo.Abp.SettingManagement.EntityFrameworkCore;
+using Volo.Abp.TenantManagement.EntityFrameworkCore;
+
+namespace Acme.BookStore.EntityFrameworkCore
+{
+ /* This DbContext is only used for database migrations.
+ * It is not used on runtime. See BookStoreDbContext for the runtime DbContext.
+ * It is a unified model that includes configuration for
+ * all used modules and your application.
+ */
+ public class BookStoreMigrationsDbContext : AbpDbContext
+ {
+ public BookStoreMigrationsDbContext(DbContextOptions options)
+ : base(options)
+ {
+
+ }
+
+ protected override void OnModelCreating(ModelBuilder builder)
+ {
+ base.OnModelCreating(builder);
+
+ /* Include modules to your migration db context */
+
+ builder.ConfigurePermissionManagement();
+ builder.ConfigureSettingManagement();
+ builder.ConfigureBackgroundJobs();
+ builder.ConfigureAuditLogging();
+ builder.ConfigureIdentity();
+ builder.ConfigureIdentityServer();
+ builder.ConfigureFeatureManagement();
+ builder.ConfigureTenantManagement();
+ builder.ConfigureBookManagement();
+
+ /* Configure customizations for entities from the modules included */
+
+ builder.Entity(b =>
+ {
+ b.ConfigureCustomUserProperties();
+ });
+
+ /* Configure your own tables/entities inside the ConfigureBookStore method */
+
+ builder.ConfigureBookStore();
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/BookStoreMigrationsDbContextFactory.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/BookStoreMigrationsDbContextFactory.cs
new file mode 100644
index 0000000000..da72e6fb21
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/BookStoreMigrationsDbContextFactory.cs
@@ -0,0 +1,31 @@
+using System.IO;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Design;
+using Microsoft.Extensions.Configuration;
+
+namespace Acme.BookStore.EntityFrameworkCore
+{
+ /* This class is needed for EF Core console commands
+ * (like Add-Migration and Update-Database commands) */
+ public class BookStoreMigrationsDbContextFactory : IDesignTimeDbContextFactory
+ {
+ public BookStoreMigrationsDbContext CreateDbContext(string[] args)
+ {
+ var configuration = BuildConfiguration();
+
+ var builder = new DbContextOptionsBuilder()
+ .UseSqlServer(configuration.GetConnectionString("Default"));
+
+ return new BookStoreMigrationsDbContext(builder.Options);
+ }
+
+ private static IConfigurationRoot BuildConfiguration()
+ {
+ var builder = new ConfigurationBuilder()
+ .SetBasePath(Directory.GetCurrentDirectory())
+ .AddJsonFile("appsettings.json", optional: false);
+
+ return builder.Build();
+ }
+ }
+}
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EntityFrameworkCoreBookStoreDbSchemaMigrator.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EntityFrameworkCoreBookStoreDbSchemaMigrator.cs
new file mode 100644
index 0000000000..954c8f7a13
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.EntityFrameworkCore.DbMigrations/EntityFrameworkCore/EntityFrameworkCoreBookStoreDbSchemaMigrator.cs
@@ -0,0 +1,24 @@
+using System.Threading.Tasks;
+using Microsoft.EntityFrameworkCore;
+using Acme.BookStore.Data;
+using Volo.Abp.DependencyInjection;
+
+namespace Acme.BookStore.EntityFrameworkCore
+{
+ [Dependency(ReplaceServices = true)]
+ public class EntityFrameworkCoreBookStoreDbSchemaMigrator
+ : IBookStoreDbSchemaMigrator, ITransientDependency
+ {
+ private readonly BookStoreMigrationsDbContext _dbContext;
+
+ public EntityFrameworkCoreBookStoreDbSchemaMigrator(BookStoreMigrationsDbContext dbContext)
+ {
+ _dbContext = dbContext;
+ }
+
+ public async Task MigrateAsync()
+ {
+ await _dbContext.Database.MigrateAsync();
+ }
+ }
+}
\ No newline at end of file
diff --git a/samples/BookStore-Modular/application/src/Acme.BookStore.EntityFrameworkCore.DbMigrations/Migrations/20190523122033_Initial.Designer.cs b/samples/BookStore-Modular/application/src/Acme.BookStore.EntityFrameworkCore.DbMigrations/Migrations/20190523122033_Initial.Designer.cs
new file mode 100644
index 0000000000..6564f3ad93
--- /dev/null
+++ b/samples/BookStore-Modular/application/src/Acme.BookStore.EntityFrameworkCore.DbMigrations/Migrations/20190523122033_Initial.Designer.cs
@@ -0,0 +1,1374 @@
+//
+using System;
+using Microsoft.EntityFrameworkCore;
+using Microsoft.EntityFrameworkCore.Infrastructure;
+using Microsoft.EntityFrameworkCore.Metadata;
+using Microsoft.EntityFrameworkCore.Migrations;
+using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
+using Acme.BookStore.EntityFrameworkCore;
+
+namespace Acme.BookStore.Migrations
+{
+ [DbContext(typeof(BookStoreMigrationsDbContext))]
+ [Migration("20190523122033_Initial")]
+ partial class Initial
+ {
+ protected override void BuildTargetModel(ModelBuilder modelBuilder)
+ {
+#pragma warning disable 612, 618
+ modelBuilder
+ .HasAnnotation("ProductVersion", "2.2.4-servicing-10062")
+ .HasAnnotation("Relational:MaxIdentifierLength", 128)
+ .HasAnnotation("SqlServer:ValueGenerationStrategy", SqlServerValueGenerationStrategy.IdentityColumn);
+
+ modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLog", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ApplicationName")
+ .HasColumnName("ApplicationName")
+ .HasMaxLength(96);
+
+ b.Property("BrowserInfo")
+ .HasColumnName("BrowserInfo")
+ .HasMaxLength(512);
+
+ b.Property("ClientId")
+ .HasColumnName("ClientId")
+ .HasMaxLength(64);
+
+ b.Property("ClientIpAddress")
+ .HasColumnName("ClientIpAddress")
+ .HasMaxLength(64);
+
+ b.Property("ClientName")
+ .HasColumnName("ClientName")
+ .HasMaxLength(128);
+
+ b.Property("Comments")
+ .HasColumnName("Comments")
+ .HasMaxLength(256);
+
+ b.Property("ConcurrencyStamp");
+
+ b.Property("CorrelationId")
+ .HasColumnName("CorrelationId")
+ .HasMaxLength(64);
+
+ b.Property("Exceptions")
+ .HasColumnName("Exceptions")
+ .HasMaxLength(4000);
+
+ b.Property("ExecutionDuration")
+ .HasColumnName("ExecutionDuration");
+
+ b.Property("ExecutionTime");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("HttpMethod")
+ .HasColumnName("HttpMethod")
+ .HasMaxLength(16);
+
+ b.Property("HttpStatusCode")
+ .HasColumnName("HttpStatusCode");
+
+ b.Property("ImpersonatorTenantId")
+ .HasColumnName("ImpersonatorTenantId");
+
+ b.Property("ImpersonatorUserId")
+ .HasColumnName("ImpersonatorUserId");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId");
+
+ b.Property("TenantName");
+
+ b.Property("Url")
+ .HasColumnName("Url")
+ .HasMaxLength(256);
+
+ b.Property("UserId")
+ .HasColumnName("UserId");
+
+ b.Property("UserName")
+ .HasColumnName("UserName")
+ .HasMaxLength(256);
+
+ b.HasKey("Id");
+
+ b.HasIndex("TenantId", "ExecutionTime");
+
+ b.HasIndex("TenantId", "UserId", "ExecutionTime");
+
+ b.ToTable("AbpAuditLogs");
+ });
+
+ modelBuilder.Entity("Volo.Abp.AuditLogging.AuditLogAction", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AuditLogId")
+ .HasColumnName("AuditLogId");
+
+ b.Property("ExecutionDuration")
+ .HasColumnName("ExecutionDuration");
+
+ b.Property("ExecutionTime")
+ .HasColumnName("ExecutionTime");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("MethodName")
+ .HasColumnName("MethodName")
+ .HasMaxLength(128);
+
+ b.Property("Parameters")
+ .HasColumnName("Parameters")
+ .HasMaxLength(2000);
+
+ b.Property("ServiceName")
+ .HasColumnName("ServiceName")
+ .HasMaxLength(256);
+
+ b.Property("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AuditLogId");
+
+ b.HasIndex("TenantId", "ServiceName", "MethodName", "ExecutionTime");
+
+ b.ToTable("AbpAuditLogActions");
+ });
+
+ modelBuilder.Entity("Volo.Abp.AuditLogging.EntityChange", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AuditLogId")
+ .HasColumnName("AuditLogId");
+
+ b.Property("ChangeTime")
+ .HasColumnName("ChangeTime");
+
+ b.Property("ChangeType")
+ .HasColumnName("ChangeType");
+
+ b.Property("EntityId")
+ .IsRequired()
+ .HasColumnName("EntityId")
+ .HasMaxLength(128);
+
+ b.Property("EntityTenantId");
+
+ b.Property("EntityTypeFullName")
+ .IsRequired()
+ .HasColumnName("EntityTypeFullName")
+ .HasMaxLength(128);
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("AuditLogId");
+
+ b.HasIndex("TenantId", "EntityTypeFullName", "EntityId");
+
+ b.ToTable("AbpEntityChanges");
+ });
+
+ modelBuilder.Entity("Volo.Abp.AuditLogging.EntityPropertyChange", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("EntityChangeId");
+
+ b.Property("NewValue")
+ .HasColumnName("NewValue")
+ .HasMaxLength(512);
+
+ b.Property("OriginalValue")
+ .HasColumnName("OriginalValue")
+ .HasMaxLength(512);
+
+ b.Property("PropertyName")
+ .IsRequired()
+ .HasColumnName("PropertyName")
+ .HasMaxLength(128);
+
+ b.Property("PropertyTypeFullName")
+ .IsRequired()
+ .HasColumnName("PropertyTypeFullName")
+ .HasMaxLength(64);
+
+ b.Property("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("EntityChangeId");
+
+ b.ToTable("AbpEntityPropertyChanges");
+ });
+
+ modelBuilder.Entity("Volo.Abp.BackgroundJobs.BackgroundJobRecord", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsAbandoned")
+ .ValueGeneratedOnAdd()
+ .HasDefaultValue(false);
+
+ b.Property("JobArgs")
+ .IsRequired()
+ .HasMaxLength(1048576);
+
+ b.Property("JobName")
+ .IsRequired()
+ .HasMaxLength(128);
+
+ b.Property("LastTryTime");
+
+ b.Property("NextTryTime");
+
+ b.Property("Priority")
+ .ValueGeneratedOnAdd()
+ .HasDefaultValue((byte)15);
+
+ b.Property("TryCount")
+ .ValueGeneratedOnAdd()
+ .HasDefaultValue((short)0);
+
+ b.HasKey("Id");
+
+ b.HasIndex("IsAbandoned", "NextTryTime");
+
+ b.ToTable("AbpBackgroundJobs");
+ });
+
+ modelBuilder.Entity("Volo.Abp.FeatureManagement.FeatureValue", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(128);
+
+ b.Property("ProviderKey")
+ .HasMaxLength(64);
+
+ b.Property("ProviderName")
+ .HasMaxLength(64);
+
+ b.Property("Value")
+ .IsRequired()
+ .HasMaxLength(128);
+
+ b.HasKey("Id");
+
+ b.HasIndex("Name", "ProviderName", "ProviderKey");
+
+ b.ToTable("AbpFeatureValues");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityClaimType", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasColumnName("ConcurrencyStamp")
+ .HasMaxLength(256);
+
+ b.Property("Description")
+ .HasMaxLength(256);
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsStatic");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(256);
+
+ b.Property("Regex")
+ .HasMaxLength(512);
+
+ b.Property("RegexDescription")
+ .HasMaxLength(128);
+
+ b.Property("Required");
+
+ b.Property("ValueType");
+
+ b.HasKey("Id");
+
+ b.ToTable("AbpClaimTypes");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityRole", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .IsRequired()
+ .HasColumnName("ConcurrencyStamp")
+ .HasMaxLength(256);
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDefault")
+ .HasColumnName("IsDefault");
+
+ b.Property("IsPublic")
+ .HasColumnName("IsPublic");
+
+ b.Property("IsStatic")
+ .HasColumnName("IsStatic");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(256);
+
+ b.Property("NormalizedName")
+ .IsRequired()
+ .HasMaxLength(256);
+
+ b.Property("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("NormalizedName");
+
+ b.ToTable("AbpRoles");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityRoleClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ClaimType")
+ .IsRequired()
+ .HasMaxLength(256);
+
+ b.Property("ClaimValue")
+ .HasMaxLength(1024);
+
+ b.Property("RoleId");
+
+ b.Property("TenantId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("RoleId");
+
+ b.ToTable("AbpRoleClaims");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityUser", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AccessFailedCount")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("AccessFailedCount")
+ .HasDefaultValue(0);
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Email")
+ .HasColumnName("Email")
+ .HasMaxLength(256);
+
+ b.Property("EmailConfirmed")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("EmailConfirmed")
+ .HasDefaultValue(false);
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId");
+
+ b.Property("LockoutEnabled")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("LockoutEnabled")
+ .HasDefaultValue(false);
+
+ b.Property("LockoutEnd");
+
+ b.Property("Name")
+ .HasColumnName("Name")
+ .HasMaxLength(64);
+
+ b.Property("NormalizedEmail")
+ .HasColumnName("NormalizedEmail")
+ .HasMaxLength(256);
+
+ b.Property("NormalizedUserName")
+ .IsRequired()
+ .HasColumnName("NormalizedUserName")
+ .HasMaxLength(256);
+
+ b.Property("PasswordHash")
+ .HasColumnName("PasswordHash")
+ .HasMaxLength(256);
+
+ b.Property("PhoneNumber")
+ .HasColumnName("PhoneNumber")
+ .HasMaxLength(16);
+
+ b.Property("PhoneNumberConfirmed")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("PhoneNumberConfirmed")
+ .HasDefaultValue(false);
+
+ b.Property("SecurityStamp")
+ .IsRequired()
+ .HasColumnName("SecurityStamp")
+ .HasMaxLength(256);
+
+ b.Property("Surname")
+ .HasColumnName("Surname")
+ .HasMaxLength(64);
+
+ b.Property("TenantId")
+ .HasColumnName("TenantId");
+
+ b.Property("TwoFactorEnabled")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("TwoFactorEnabled")
+ .HasDefaultValue(false);
+
+ b.Property("UserName")
+ .IsRequired()
+ .HasColumnName("UserName")
+ .HasMaxLength(256);
+
+ b.HasKey("Id");
+
+ b.HasIndex("Email");
+
+ b.HasIndex("NormalizedEmail");
+
+ b.HasIndex("NormalizedUserName");
+
+ b.HasIndex("UserName");
+
+ b.ToTable("AbpUsers");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityUserClaim", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ClaimType")
+ .IsRequired()
+ .HasMaxLength(256);
+
+ b.Property("ClaimValue")
+ .HasMaxLength(1024);
+
+ b.Property("TenantId");
+
+ b.Property("UserId");
+
+ b.HasKey("Id");
+
+ b.HasIndex("UserId");
+
+ b.ToTable("AbpUserClaims");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityUserLogin", b =>
+ {
+ b.Property("UserId");
+
+ b.Property("LoginProvider")
+ .HasMaxLength(64);
+
+ b.Property("ProviderDisplayName")
+ .HasMaxLength(128);
+
+ b.Property("ProviderKey")
+ .IsRequired()
+ .HasMaxLength(196);
+
+ b.Property("TenantId");
+
+ b.HasKey("UserId", "LoginProvider");
+
+ b.HasIndex("LoginProvider", "ProviderKey");
+
+ b.ToTable("AbpUserLogins");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityUserRole", b =>
+ {
+ b.Property("UserId");
+
+ b.Property("RoleId");
+
+ b.Property("TenantId");
+
+ b.HasKey("UserId", "RoleId");
+
+ b.HasIndex("RoleId", "UserId");
+
+ b.ToTable("AbpUserRoles");
+ });
+
+ modelBuilder.Entity("Volo.Abp.Identity.IdentityUserToken", b =>
+ {
+ b.Property("UserId");
+
+ b.Property("LoginProvider")
+ .HasMaxLength(64);
+
+ b.Property("Name")
+ .HasMaxLength(128);
+
+ b.Property("TenantId");
+
+ b.Property("Value");
+
+ b.HasKey("UserId", "LoginProvider", "Name");
+
+ b.ToTable("AbpUserTokens");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResource", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Description")
+ .HasMaxLength(1000);
+
+ b.Property("DisplayName")
+ .HasMaxLength(200);
+
+ b.Property("Enabled");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId");
+
+ b.Property("Name")
+ .IsRequired()
+ .HasMaxLength(200);
+
+ b.HasKey("Id");
+
+ b.ToTable("IdentityServerApiResources");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiResourceClaim", b =>
+ {
+ b.Property("ApiResourceId");
+
+ b.Property("Type")
+ .HasMaxLength(196);
+
+ b.HasKey("ApiResourceId", "Type");
+
+ b.ToTable("IdentityServerApiClaims");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScope", b =>
+ {
+ b.Property("ApiResourceId");
+
+ b.Property("Name")
+ .HasMaxLength(196);
+
+ b.Property("Description")
+ .HasMaxLength(256);
+
+ b.Property("DisplayName")
+ .HasMaxLength(128);
+
+ b.Property("Emphasize");
+
+ b.Property("Required");
+
+ b.Property("ShowInDiscoveryDocument");
+
+ b.HasKey("ApiResourceId", "Name");
+
+ b.ToTable("IdentityServerApiScopes");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiScopeClaim", b =>
+ {
+ b.Property("ApiResourceId");
+
+ b.Property("Name")
+ .HasMaxLength(196);
+
+ b.Property("Type")
+ .HasMaxLength(196);
+
+ b.HasKey("ApiResourceId", "Name", "Type");
+
+ b.ToTable("IdentityServerApiScopeClaims");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.ApiResources.ApiSecret", b =>
+ {
+ b.Property("ApiResourceId");
+
+ b.Property("Type")
+ .HasMaxLength(32);
+
+ b.Property("Value")
+ .HasMaxLength(196);
+
+ b.Property("Description")
+ .HasMaxLength(256);
+
+ b.Property("Expiration");
+
+ b.HasKey("ApiResourceId", "Type", "Value");
+
+ b.ToTable("IdentityServerApiSecrets");
+ });
+
+ modelBuilder.Entity("Volo.Abp.IdentityServer.Clients.Client", b =>
+ {
+ b.Property("Id")
+ .ValueGeneratedOnAdd();
+
+ b.Property("AbsoluteRefreshTokenLifetime");
+
+ b.Property("AccessTokenLifetime");
+
+ b.Property("AccessTokenType");
+
+ b.Property("AllowAccessTokensViaBrowser");
+
+ b.Property("AllowOfflineAccess");
+
+ b.Property("AllowPlainTextPkce");
+
+ b.Property("AllowRememberConsent");
+
+ b.Property("AlwaysIncludeUserClaimsInIdToken");
+
+ b.Property("AlwaysSendClientClaims");
+
+ b.Property("AuthorizationCodeLifetime");
+
+ b.Property("BackChannelLogoutSessionRequired");
+
+ b.Property("BackChannelLogoutUri")
+ .HasMaxLength(300);
+
+ b.Property("ClientClaimsPrefix")
+ .HasMaxLength(200);
+
+ b.Property("ClientId")
+ .IsRequired()
+ .HasMaxLength(200);
+
+ b.Property("ClientName")
+ .HasMaxLength(200);
+
+ b.Property("ClientUri")
+ .HasMaxLength(300);
+
+ b.Property("ConcurrencyStamp")
+ .IsConcurrencyToken()
+ .HasColumnName("ConcurrencyStamp");
+
+ b.Property("ConsentLifetime");
+
+ b.Property("CreationTime")
+ .HasColumnName("CreationTime");
+
+ b.Property("CreatorId")
+ .HasColumnName("CreatorId");
+
+ b.Property("DeleterId")
+ .HasColumnName("DeleterId");
+
+ b.Property("DeletionTime")
+ .HasColumnName("DeletionTime");
+
+ b.Property("Description")
+ .HasMaxLength(1000);
+
+ b.Property("EnableLocalLogin");
+
+ b.Property("Enabled");
+
+ b.Property("ExtraProperties")
+ .HasColumnName("ExtraProperties");
+
+ b.Property("FrontChannelLogoutSessionRequired");
+
+ b.Property("FrontChannelLogoutUri")
+ .HasMaxLength(300);
+
+ b.Property("IdentityTokenLifetime");
+
+ b.Property("IncludeJwtId");
+
+ b.Property("IsDeleted")
+ .ValueGeneratedOnAdd()
+ .HasColumnName("IsDeleted")
+ .HasDefaultValue(false);
+
+ b.Property("LastModificationTime")
+ .HasColumnName("LastModificationTime");
+
+ b.Property("LastModifierId")
+ .HasColumnName("LastModifierId");
+
+ b.Property("LogoUri")
+ .HasMaxLength(300);
+
+ b.Property("PairWiseSubjectSalt")
+ .HasMaxLength(200);
+
+ b.Property("ProtocolType")
+ .IsRequired()
+ .HasMaxLength(200);
+
+ b.Property("RefreshTokenExpiration");
+
+ b.Property("RefreshTokenUsage");
+
+ b.Property("RequireClientSecret");
+
+ b.Property("RequireConsent");
+
+ b.Property("RequirePkce");
+
+ b.Property("SlidingRefreshTokenLifetime");
+
+ b.Property