Browse Source

Merge branch 'dev' into dev-client-validation

pull/5973/head
Mladen Macanovic 6 years ago
parent
commit
4cbe5c0dc7
  1. 2
      .github/workflows/build-and-test.yml
  2. 7
      NuGet.Config
  3. 4
      build/common.ps1
  4. 2
      common.props
  5. 62
      docs/en/Application-Services.md
  6. 271
      docs/en/Blog-Posts/2020-10-15 v3_3_Preview/POST.md
  7. BIN
      docs/en/Blog-Posts/2020-10-15 v3_3_Preview/abp-blazor-ui.png
  8. BIN
      docs/en/Blog-Posts/2020-10-15 v3_3_Preview/abp-commercial-blazor-ui.png
  9. BIN
      docs/en/Blog-Posts/2020-10-15 v3_3_Preview/abp-commercial-linked-users.png
  10. BIN
      docs/en/Blog-Posts/2020-10-15 v3_3_Preview/abp-commercial-setting-account-external-logins.png
  11. 13
      docs/en/Migration-Guides/BlazorUI-3_3.md
  12. 49
      docs/en/Repositories.md
  13. 2
      docs/en/Tutorials/Part-10.md
  14. 10
      docs/en/Tutorials/Part-2.md
  15. 20
      docs/en/Tutorials/Part-3.md
  16. 3
      docs/en/Tutorials/Part-4.md
  17. 8
      docs/en/Tutorials/Part-5.md
  18. 4
      docs/en/Tutorials/Part-7.md
  19. 14
      docs/en/Tutorials/Part-9.md
  20. BIN
      docs/en/Tutorials/images/bookstore-authors-blazor-ui.png
  21. 24
      docs/en/UI/AspNetCore/JavaScript-API/Auth.md
  22. 56
      docs/en/UI/AspNetCore/JavaScript-API/Block-Busy.md
  23. 49
      docs/en/UI/AspNetCore/JavaScript-API/CurrentUser.md
  24. 117
      docs/en/UI/AspNetCore/JavaScript-API/DOM.md
  25. 88
      docs/en/UI/AspNetCore/JavaScript-API/Events.md
  26. 15
      docs/en/UI/AspNetCore/JavaScript-API/Features.md
  27. 28
      docs/en/UI/AspNetCore/JavaScript-API/Index.md
  28. 49
      docs/en/UI/AspNetCore/JavaScript-API/Logging.md
  29. 40
      docs/en/UI/AspNetCore/JavaScript-API/ResourceLoader.md
  30. 32
      docs/en/docs-nav.json
  31. BIN
      docs/en/images/ui-busy.png
  32. 4
      framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj
  33. 2
      framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Volo.Abp.AspNetCore.Authentication.OAuth.csproj
  34. 4
      framework/src/Volo.Abp.AspNetCore.Authentication.OpenIdConnect/Volo.Abp.AspNetCore.Authentication.OpenIdConnect.csproj
  35. 3
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.csproj
  36. 3
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.csproj
  37. 7
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Microsoft/AspNetCore/Components/WebAssembly/Hosting/AbpWebAssemblyHostBuilderExtensions.cs
  38. 6
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo.Abp.AspNetCore.Components.WebAssembly.csproj
  39. 13
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/AbpExceptionHandlingLogger.cs
  40. 2
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/AbpExceptionHandlingLoggerProvider.cs
  41. 7
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/IUserExceptionInformer.cs
  42. 33
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/UserExceptionInformer.cs
  43. 2
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/MultiTenancy/WebAssemblyCurrentTenantAccessor.cs
  44. 45
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/MultiTenancy/WebAssemblyRemoteTenantStore.cs
  45. 35
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/MultiTenancy/WebAssemblyRemoteTenantStoreCache.cs
  46. 34
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/NullUiMessageService.cs
  47. 5
      framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/SimpleUiMessageService.cs
  48. 2
      framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo.Abp.AspNetCore.MultiTenancy.csproj
  49. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo.Abp.AspNetCore.Mvc.Client.csproj
  50. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj
  51. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj
  52. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.csproj
  53. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo.Abp.AspNetCore.Mvc.UI.Packages.csproj
  54. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj
  55. 4
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.csproj
  56. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj
  57. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo.Abp.AspNetCore.Mvc.UI.Widgets.csproj
  58. 2
      framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj
  59. 6
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj
  60. 3
      framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ModelBinding/AbpDateTimeModelBinderProvider.cs
  61. 2
      framework/src/Volo.Abp.AspNetCore.Serilog/Volo.Abp.AspNetCore.Serilog.csproj
  62. 2
      framework/src/Volo.Abp.AspNetCore.SignalR/Volo.Abp.AspNetCore.SignalR.csproj
  63. 4
      framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj
  64. 2
      framework/src/Volo.Abp.AspNetCore/Volo.Abp.AspNetCore.csproj
  65. 758
      framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/AbpAspNetCoreContentOptions.cs
  66. 2
      framework/src/Volo.Abp.Authorization/Volo.Abp.Authorization.csproj
  67. 2
      framework/src/Volo.Abp.Autofac.WebAssembly/Volo.Abp.Autofac.WebAssembly.csproj
  68. 2
      framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj
  69. 2
      framework/src/Volo.Abp.BackgroundJobs.Quartz/Volo.Abp.BackgroundJobs.Quartz.csproj
  70. 2
      framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo.Abp.BackgroundWorkers.Quartz.csproj
  71. 7
      framework/src/Volo.Abp.BlazoriseUI/Volo.Abp.BlazoriseUI.csproj
  72. 2
      framework/src/Volo.Abp.BlobStoring.Aliyun/Volo.Abp.BlobStoring.Aliyun.csproj
  73. 2
      framework/src/Volo.Abp.BlobStoring.Aws/Volo.Abp.BlobStoring.Aws.csproj
  74. 4
      framework/src/Volo.Abp.BlobStoring.Minio/Volo.Abp.BlobStoring.Minio.csproj
  75. 2
      framework/src/Volo.Abp.Caching.StackExchangeRedis/Volo.Abp.Caching.StackExchangeRedis.csproj
  76. 2
      framework/src/Volo.Abp.Caching/Volo.Abp.Caching.csproj
  77. 6
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppTemplateBase.cs
  78. 47
      framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/RandomizeStringEncryptionStep.cs
  79. 8
      framework/src/Volo.Abp.Cli/Volo.Abp.Cli.csproj
  80. 14
      framework/src/Volo.Abp.Core/System/Linq/PredicateOperator.cs
  81. 18
      framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj
  82. 2
      framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj
  83. 6
      framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj
  84. 26
      framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Microsoft/EntityFrameworkCore/AbpOracleModelBuilderExtensions.cs
  85. 2
      framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo.Abp.EntityFrameworkCore.Oracle.Devart.csproj
  86. 52
      framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleDevartExtensions.cs
  87. 64
      framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsOracleDevartExtensions.cs
  88. 44
      framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/Oracle/Devart/AbpEntityFrameworkCoreOracleDevartModule.cs
  89. 2
      framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo.Abp.EntityFrameworkCore.Oracle.csproj
  90. 50
      framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleExtensions.cs
  91. 60
      framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsOracleExtensions.cs
  92. 44
      framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/Oracle/AbpEntityFrameworkCoreOracleModule.cs
  93. 4
      framework/src/Volo.Abp.EntityFrameworkCore.PostgreSql/Volo.Abp.EntityFrameworkCore.PostgreSql.csproj
  94. 4
      framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj
  95. 4
      framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj
  96. 6
      framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj
  97. 15
      framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DatabaseFacadeExtensions.cs
  98. 2
      framework/src/Volo.Abp.EventBus.Kafka/Volo.Abp.EventBus.Kafka.csproj
  99. 2
      framework/src/Volo.Abp.ExceptionHandling/Volo.Abp.ExceptionHandling.csproj
  100. 2
      framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo.Abp.Http.Client.IdentityModel.Web.csproj

2
.github/workflows/build-and-test.yml

@ -17,7 +17,7 @@ jobs:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- uses: actions/setup-dotnet@master - uses: actions/setup-dotnet@master
with: with:
dotnet-version: 3.1.102 dotnet-version: 5.0.100-rc.2.20479.15
- name: Build All - name: Build All
run: .\build-all.ps1 run: .\build-all.ps1

7
NuGet.Config

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />
<add key="BlazoriseMyGet" value="https://www.myget.org/F/blazorise/api/v3/index.json" />
</packageSources>
</configuration>

4
build/common.ps1

@ -16,7 +16,9 @@ $solutionPaths = @(
"../modules/tenant-management", "../modules/tenant-management",
"../modules/audit-logging", "../modules/audit-logging",
"../modules/background-jobs", "../modules/background-jobs",
"../modules/account" "../modules/account",
"../modules/cms-kit",
"../modules/blob-storing-database"
) )
if ($full -eq "-f") if ($full -eq "-f")

2
common.props

@ -1,7 +1,7 @@
<Project> <Project>
<PropertyGroup> <PropertyGroup>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
<Version>3.3.0</Version> <Version>4.0.0</Version>
<NoWarn>$(NoWarn);CS1591;CS0436</NoWarn> <NoWarn>$(NoWarn);CS1591;CS0436</NoWarn>
<PackageIconUrl>https://abp.io/assets/abp_nupkg.png</PackageIconUrl> <PackageIconUrl>https://abp.io/assets/abp_nupkg.png</PackageIconUrl>
<PackageProjectUrl>https://abp.io/</PackageProjectUrl> <PackageProjectUrl>https://abp.io/</PackageProjectUrl>

62
docs/en/Application-Services.md

@ -445,6 +445,68 @@ These methods are used to convert Entities to DTOs and vice verse. They uses the
* `MapToEntityAsync(TCreateInput)` is used to create an entity from `TCreateInput`. * `MapToEntityAsync(TCreateInput)` is used to create an entity from `TCreateInput`.
* `MapToEntityAsync(TUpdateInput, TEntity)` is used to update an existing entity from `TUpdateInput`. * `MapToEntityAsync(TUpdateInput, TEntity)` is used to update an existing entity from `TUpdateInput`.
## Miscellaneous
### Working with Streams
`Stream` object itself is not serializable. So, you may have problems if you directly use `Stream` as the parameter or the return value for your application service. ABP Framework provides a special type, `IRemoteStreamContent` to be used to get or return streams in the application services.
**Example: Application Service Interface that can be used to get and return streams**
````csharp
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using Volo.Abp.Content;
namespace MyProject.Test
{
public interface ITestAppService : IApplicationService
{
Task Upload(Guid id, IRemoteStreamContent streamContent);
Task<IRemoteStreamContent> Download(Guid id);
}
}
````
**Example: Application Service Implementation that can be used to get and return streams**
````csharp
using System;
using System.IO;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Services;
using Volo.Abp.Content;
namespace MyProject.Test
{
public class TestAppService : ApplicationService, ITestAppService
{
public Task<IRemoteStreamContent> Download(Guid id)
{
var fs = new FileStream("C:\\Temp\\" + id + ".blob", FileMode.OpenOrCreate);
return Task.FromResult(
(IRemoteStreamContent) new RemoteStreamContent(fs) {
ContentType = "application/octet-stream"
}
);
}
public async Task Upload(Guid id, IRemoteStreamContent streamContent)
{
using (var fs = new FileStream("C:\\Temp\\" + id + ".blob", FileMode.Create))
{
await streamContent.GetStream().CopyToAsync(fs);
await fs.FlushAsync();
}
}
}
}
````
`IRemoteStreamContent` is compatible with the [Auto API Controller](API/Auto-API-Controllers.md) and [Dynamic C# HTTP Proxy](API/Dynamic-CSharp-API-Clients.md) systems.
## Lifetime ## Lifetime
Lifetime of application services are [transient](Dependency-Injection.md) and they are automatically registered to the dependency injection system. Lifetime of application services are [transient](Dependency-Injection.md) and they are automatically registered to the dependency injection system.

271
docs/en/Blog-Posts/2020-10-15 v3_3_Preview/POST.md

@ -0,0 +1,271 @@
# ABP Framework 3.3 RC Has Been Published
We have released the [ABP Framework](https://abp.io/) (and the [ABP Commercial](https://commercial.abp.io/)) `3.3.0-rc.1` today. This blog post introduces the new features and important changes in the new version.
## Get Started with the 3.3 RC.1
If you want to try the version `3.3.0-rc.1` today, follow the steps below;
1) **Upgrade** the ABP CLI to the version `3.3.0-rc.1` using a command line terminal:
````bash
dotnet tool update Volo.Abp.Cli -g --version 3.3.0-rc.1
````
**or install** if you haven't installed before:
````bash
dotnet tool install Volo.Abp.Cli -g --version 3.3.0-rc.1
````
2) Create a **new application** with the `--preview` option:
````bash
abp new BookStore --preview
````
See the [ABP CLI documentation](https://docs.abp.io/en/abp/3.3/CLI) for all the available options.
> You can also use the *Direct Download* tab on the [Get Started](https://abp.io/get-started) page by selecting the Preview checkbox.
## What's new with the ABP Framework 3.3
### The Blazor UI
We had released an experimental early preview version of the Blazor UI with the [previous version](https://blog.abp.io/abp/ABP-Framework-ABP-Commercial-3.2-RC-With-The-New-Blazor-UI). In this version, we've completed most of the fundamental infrastructure features and the application modules (like identity and tenant management).
It currently has almost the same functionalities as the other UI types (Angular & MVC / Razor Pages).
**Example screenshot**: User management page of the Blazor UI
![abp-blazor-ui](abp-blazor-ui.png)
> We've adapted the [Lepton Theme](https://commercial.abp.io/themes) for the ABP Commercial, see the related section below.
We are still working on the fundamentals. So, the next version may introduce breaking changes of the Blazor UI. We will work hard to keep them with the minimal effect on your application code.
#### Breaking Changes on the Blazor UI
There are some breaking changes with the Blazor UI. If you've built an application and upgrade it, your application might not properly work. See [the migration guide](https://docs.abp.io/en/abp/3.3/Migration-Guides/BlazorUI-3_3) for the changes you need to do after upgrading your application.
### Automatic Validation for AntiForgery Token for HTTP APIs
Starting with the version 3.3, all your HTTP API endpoints are **automatically protected** against CSRF attacks, unless you disable it for your application. So, no configuration needed, just upgrade the ABP Framework.
[See the documentation](https://docs.abp.io/en/abp/3.3/CSRF-Anti-Forgery) to if you want to understand why you need it and how ABP Framework solves the problem.
### Rebus Integration Package for the Distributed Event Bus
[Rebus](https://github.com/rebus-org/Rebus) describes itself as "Simple and lean service bus implementation for .NET". There are a lot of integration packages like RabbitMQ and Azure Service Bus for the Rebus. The new [Volo.Abp.EventBus.Rebus](https://www.nuget.org/packages/Volo.Abp.EventBus.Rebus) package allows you to use the Rebus as the [distributed event bus](https://docs.abp.io/en/abp/latest/Distributed-Event-Bus) for the ABP Framework.
See [the documentation](https://docs.abp.io/en/abp/3.3/Distributed-Event-Bus-Rebus-Integration) to learn how to use Rebus with the ABP Framework.
### Async Repository LINQ Extension Methods
You have a problem when you want to use **Async LINQ Extension Methods** (e.g. `FirstOrDefaultAsync(...)`) in your **domain** and **application** layers. These async methods are **not included in the standard LINQ extension methods**. Those are defined by the [Microsoft.EntityFrameworkCore](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore) NuGet package (see [the code](https://github.com/dotnet/efcore/blob/main/src/EFCore/Extensions/EntityFrameworkQueryableExtensions.cs)). To be able to use these `async` methods, you need to reference to the `Microsoft.EntityFrameworkCore` package.
If you don't want to depend on the EF Core in your business layer, then ABP Framework provides the `IAsyncQueryableExecuter` service to execute your queries asynchronously without depending on the EF Core package. You can see [the documentation](https://docs.abp.io/en/abp/latest/Repositories#option-3-iasyncqueryableexecuter) to get more information about this service.
ABP Framework version 3.3 takes this one step further and allows you to directly execute the async LINQ extension methods on the `IRepository` interface.
**Example: Use `CountAsync` and `FirstOrDefaultAsync` methods on the repositories**
````csharp
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using Volo.Abp.Domain.Repositories;
namespace MyCompanyName.MyProjectName
{
public class BookAppService : ApplicationService, IBookAppService
{
private readonly IRepository<Book, Guid> _bookRepository;
public BookAppService(IRepository<Book, Guid> bookRepository)
{
_bookRepository = bookRepository;
}
public async Task DemoAsync()
{
var countAll = await _bookRepository
.CountAsync();
var count = await _bookRepository
.CountAsync(x => x.Name.Contains("A"));
var book1984 = await _bookRepository
.FirstOrDefaultAsync(x => x.Name == "1984");
}
}
}
````
All the standard LINQ methods are supported: *AllAsync, AnyAsync, AverageAsync, ContainsAsync, CountAsync, FirstAsync, FirstOrDefaultAsync, LastAsync, LastOrDefaultAsync, LongCountAsync, MaxAsync, MinAsync, SingleAsync, SingleOrDefaultAsync, SumAsync, ToArrayAsync, ToListAsync*.
This approach still has a limitation. You need to execute the extension method directly on the repository object. For example, the below usage is **not supported**:
````csharp
var count = await _bookRepository.Where(x => x.Name.Contains("A")).CountAsync();
````
This is because the object returned from the `Where` method is not a repository object, it is a standard `IQueryable`. In such cases, you can still use the `IAsyncQueryableExecuter`:
````csharp
var count = await AsyncExecuter.CountAsync(
_bookRepository.Where(x => x.Name.Contains("A"))
);
````
`AsyncExecuter` has all the standard extension methods, so you don't have any restriction here. See [the repository documentation](https://docs.abp.io/en/abp/latest/Repositories#iqueryable-async-operations) for all the options you have.
> ABP Framework does its best to not depend on the EF Core and still be able to use the async LINQ extension methods. However, there is no problem to depend on the EF Core for your application, you can add the `Microsoft.EntityFrameworkCore` NuGet package and use the native methods.
### Stream Support for the Application Service Methods
[Application services](https://docs.abp.io/en/abp/latest/Application-Services) are consumed by clients and the parameters and return values (typically [Data Transfer Objects](https://docs.abp.io/en/abp/latest/Data-Transfer-Objects)). In case of the client is a remote application, then these objects should be serialized & deserialized.
Until the version 3.3, we hadn't suggest to use the `Stream` in the application service contracts, since it is not serializable/deserializable. However, with the version 3.3, ABP Framework properly supports this scenario by introducing the new `IRemoteStreamContent` interface.
Example: An application service that can get or return streams
````csharp
using System;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;
using Volo.Abp.Content;
namespace MyProject.Test
{
public interface ITestAppService : IApplicationService
{
Task Upload(Guid id, IRemoteStreamContent streamContent);
Task<IRemoteStreamContent> Download(Guid id);
}
}
````
The implementation can be as shown below:
````csharp
using System;
using System.IO;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.Application.Services;
using Volo.Abp.Content;
namespace MyProject.Test
{
public class TestAppService : ApplicationService, ITestAppService
{
public Task<IRemoteStreamContent> Download(Guid id)
{
var fs = new FileStream("C:\\Temp\\" + id + ".blob", FileMode.OpenOrCreate);
return Task.FromResult(
(IRemoteStreamContent) new RemoteStreamContent(fs) {
ContentType = "application/octet-stream"
}
);
}
public async Task Upload(Guid id, IRemoteStreamContent streamContent)
{
using (var fs = new FileStream("C:\\Temp\\" + id + ".blob", FileMode.Create))
{
await streamContent.GetStream().CopyToAsync(fs);
await fs.FlushAsync();
}
}
}
}
````
> This is just a demo code. Do it better in your production code :)
Thanks to [@alexandru-bagu](https://github.com/alexandru-bagu) for the great contribution!
### Other Changes
* Upgraded all the .NET Core / ASP.NET Core related packages to the version 3.1.8. If you have additional dependencies to the .NET Core / ASP.NET Core related packages, we suggest you to updates your packages to the version 3.1.8 to have the latest bug and security fixes published by Microsoft.
* The blogging module now uses the [BLOB Storing](https://docs.abp.io/en/abp/latest/Blob-Storing) system to store images & files of the blog posts. If you are using this module, then you need to manually migrate the local files to the BLOB Storing system after the upgrade.
* The Angular UI is now redirecting to the profile management page of the MVC UI instead of using its own UI, if you've configured the authorization code flow (which is default since the version 3.2.0).
## What's new with the ABP Commercial 3.3
### The Blazor UI
We have good news for the ABP Commercial Blazor UI too. We have implemented the [Lepton Theme](https://commercial.abp.io/themes) integration, so it is now available with the Blazor UI. Also, implemented most of the fundamental [modules](https://commercial.abp.io/modules).
**A screenshot from the ABP Commercial startup template with the Blazor UI**
![abp-commercial-blazor-ui](abp-commercial-blazor-ui.png)
There are still missing features and modules. However, we are working on it to have a more complete version in the next release.
#### Breaking Changes on the Blazor UI
There are some breaking changes with the Blazor UI. If you've built an application and upgrade it, your application might not properly work. See the [ABP Commercial Blazor UI v 3.3 Migration Guide](https://docs.abp.io/en/commercial/3.3/migration-guides/blazor-ui-3_3) for the changes you need to do after upgrading your application.
#### Known Issues
When you create a new project, profile management doesn't work, you get an exception because it can't find the `/libs/cropperjs/css/cropper.min.css` file. To fix the issue;
* Add `"@volo/account": "^3.3.0-rc.1"` to the `package.json` in the `.Host` project.
* Run `yarn` (or `npm install`), then `gulp` on a command line terminal in the root folder of the `.Host` project.
### Multi-Tenant Social Logins
[Account module](https://commercial.abp.io/modules/Volo.Account.Pro) now supports to manage the social/external logins in the UI. You can **enable/disable** and **set options** in the settings page. It also supports to use **different credentials for the tenants** and it is also **configured on the runtime**.
![abp-commercial-setting-account-external-logins](abp-commercial-setting-account-external-logins.png)
### Linked Accounts
Linked user system allows you to link other accounts (including account in a different tenant) with your account, so you can switch between different accounts with a single-click. It is practical since you no longer need to logout and login again with entering the credentials of the target account.
To manage the linked accounts, go to the profile management page from the user menu;
![abp-commercial-linked-users](abp-commercial-linked-users.png)
### Paypal & Stripe Integrations
The [Payment Module](https://commercial.abp.io/modules/Volo.Payment) was supporting PayU and 2Checkout providers until the version 3.3. It's now integrated to PayPal and Stripe. See the [technical documentation](https://docs.abp.io/en/commercial/latest/modules/payment) to learn how to use it.
### ABP Suite Improvements
We've done a lot of small improvements for the [ABP Suite](https://commercial.abp.io/tools/suite). Some of the enhancements are;
* Show the previously installed modules as *installed* on the module list.
* Switch between the latest stable, the latest [preview](https://docs.abp.io/en/abp/latest/Previews) and the latest [nightly build](https://docs.abp.io/en/abp/latest/Nightly-Builds) versions of the ABP related packages.
* Moved the file that stores the *previously created entities* into the solution folder to allow you to store it in your source control system.
### Others
* Added an option to the Account Module to show reCAPTCHA on the login & the registration forms.
Besides the new features introduced in this post, we've done a lot of small other enhancements and bug fixes to provide a better development experience and increase the developer productivity.
## New Articles
The core ABP Framework team & the community continue to publish new articles on the [ABP Community](https://community.abp.io/) web site. The recently published articles are;
* [Replacing Email Templates and Sending Emails](https://community.abp.io/articles/replacing-email-templates-and-sending-emails-jkeb8zzh) (by [@EngincanV](https://community.abp.io/members/EngincanV))
* [How to Add Custom Properties to the User Entity](https://community.abp.io/articles/how-to-add-custom-property-to-the-user-entity-6ggxiddr) (by [@berkansasmaz](https://community.abp.io/members/berkansasmaz))
* [Using the AdminLTE Theme with the ABP Framework MVC / Razor Pages UI](https://community.abp.io/articles/using-the-adminlte-theme-with-the-abp-framework-mvc-razor-pages-ui-gssbhb7m) (by [@mucahiddanis](https://community.abp.io/members/mucahiddanis))
* [Using DevExtreme Angular Components With the ABP Framework](https://community.abp.io/articles/using-devextreme-angular-components-with-the-abp-framework-x5nyvj3i) (by [@bunyamin](https://community.abp.io/members/bunyamin))
It is appreciated if you want to [submit an article](https://community.abp.io/articles/submit) related to the ABP Framework.
## About the Next Release
The next version will be `4.0.0`. We are releasing a major version, since we will move the ABP Framework to .NET 5.0. We see that for most of the applications this will not be a breaking change and we hope you easily upgrade to it.
The planned 4.0.0-rc.1 (Release Candidate) version date is **November 11**, just after the Microsoft releases the .NET 5.0 final. The planned 4.0.0 final release date is **November 26**.
Follow the [GitHub milestones](https://github.com/abpframework/abp/milestones) for all the planned ABP Framework version release dates.
## Feedback
Please check out the ABP Framework 3.3.0 RC and [provide feedback](https://github.com/abpframework/abp/issues/new) to help us to release a more stable version. The planned release date for the [3.3.0 final](https://github.com/abpframework/abp/milestone/44) version is October 27th.

BIN
docs/en/Blog-Posts/2020-10-15 v3_3_Preview/abp-blazor-ui.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

BIN
docs/en/Blog-Posts/2020-10-15 v3_3_Preview/abp-commercial-blazor-ui.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 KiB

BIN
docs/en/Blog-Posts/2020-10-15 v3_3_Preview/abp-commercial-linked-users.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
docs/en/Blog-Posts/2020-10-15 v3_3_Preview/abp-commercial-setting-account-external-logins.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 KiB

13
docs/en/Migration-Guides/BlazorUI-3_3.md

@ -0,0 +1,13 @@
# Migration Guide for the Blazor UI from the v3.2 to the v3.3
## Startup Template Changes
* Remove `Volo.Abp.Account.Blazor` NuGet package from your `.Blazor.csproj` and add `Volo.Abp.TenantManagement.Blazor` NuGet package.
* Remove the ``typeof(AbpAccountBlazorModule)`` from the dependency list of *YourProjectBlazorModule* class and add the `typeof(AbpTenantManagementBlazorModule)`.
* Add `@using Volo.Abp.BlazoriseUI` and `@using Volo.Abp.BlazoriseUI.Components` into the `_Imports.razor` file.
* Remove the `div` with `id="blazor-error-ui"` (with its contents) from the `wwwroot/index.html ` file, since the ABP Framework now shows error messages as a better message box.
## BlazoriseCrudPageBase to AbpCrudPageBase
Renamed `BlazoriseCrudPageBase` to `AbpCrudPageBase`. Just update the usages. It also has some changes, you may need to update method calls/usages manually.

49
docs/en/Repositories.md

@ -142,7 +142,7 @@ var people = _personRepository
You normally want to use `.ToListAsync()`, `.CountAsync()`... instead, to be able to write a **truly async code**. You normally want to use `.ToListAsync()`, `.CountAsync()`... instead, to be able to write a **truly async code**.
However, you see that you can't use these async extension methods in your application or domain layer when you create a new project using the standard [application startup template](Startup-Templates/Application.md), because; However, you see that you can't use all the async extension methods in your application or domain layer when you create a new project using the standard [application startup template](Startup-Templates/Application.md), because;
* These async methods **are not standard LINQ methods** and they are defined in the [Microsoft.EntityFrameworkCore](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore) NuGet package. * These async methods **are not standard LINQ methods** and they are defined in the [Microsoft.EntityFrameworkCore](https://www.nuget.org/packages/Microsoft.EntityFrameworkCore) NuGet package.
* The standard template **doesn't have a reference** to the EF Core package from the domain and application layers, to be independent from the database provider. * The standard template **doesn't have a reference** to the EF Core package from the domain and application layers, to be independent from the database provider.
@ -151,9 +151,9 @@ Based on your requirements and development model, you have the following options
> Using async methods is strongly suggested! Don't use sync LINQ methods while executing database queries to be able to develop a scalable application. > Using async methods is strongly suggested! Don't use sync LINQ methods while executing database queries to be able to develop a scalable application.
### Option-1: Reference to the EF Core ### Option-1: Reference to the Database Provider Package
The easiest solution is to directly add the EF Core package from the project you want to use these async methods. **The easiest solution** is to directly add the EF Core package from the project you want to use these async methods.
> Add the [Volo.Abp.EntityFrameworkCore](https://www.nuget.org/packages/Volo.Abp.EntityFrameworkCore) NuGet package to your project, which indirectly reference to the EF Core package. This ensures that you use the correct version of the EF Core compatible to the rest of your application. > Add the [Volo.Abp.EntityFrameworkCore](https://www.nuget.org/packages/Volo.Abp.EntityFrameworkCore) NuGet package to your project, which indirectly reference to the EF Core package. This ensures that you use the correct version of the EF Core compatible to the rest of your application.
@ -183,14 +183,34 @@ var people = ((IMongoQueryable<Person>)_personRepository
.ToListAsync(); .ToListAsync();
```` ````
### Option-2: Custom Repository Methods ### Option-2: Use the IRepository Async Extension Methods
You can always create custom repository methods and use the database provider specific APIs, like async extension methods here. See [EF Core](Entity-Framework-Core.md) or [MongoDb](MongoDB.md) document for more info about the custom repositories. ABP Framework provides async extension methods for the repositories, just similar to async LINQ extension methods.
This method is suggested; **Example: Use `CountAsync` and `FirstOrDefaultAsync` methods on the repositories**
* If you want to **completely isolate** your domain & application layers from the database provider. ````csharp
* If you develop a **reusable [application module](Modules/Index.md)** and don't want to force to a specific database provider, which should be done as a [best practice](Best-Practices/Index.md). var countAll = await _personRepository
.CountAsync();
var count = await _personRepository
.CountAsync(x => x.Name.StartsWith("A"));
var book1984 = await _bookRepository
.FirstOrDefaultAsync(x => x.Name == "John");
````
The standard LINQ extension methods are supported: *AllAsync, AnyAsync, AverageAsync, ContainsAsync, CountAsync, FirstAsync, FirstOrDefaultAsync, LastAsync, LastOrDefaultAsync, LongCountAsync, MaxAsync, MinAsync, SingleAsync, SingleOrDefaultAsync, SumAsync, ToArrayAsync, ToListAsync*.
This approach still **has a limitation**. You need to call the extension method directly on the repository object. For example, the below usage is **not supported**:
```csharp
var count = await _bookRepository.Where(x => x.Name.Contains("A")).CountAsync();
```
This is because the object returned from the `Where` method is not a repository object, it is a standard `IQueryable` interface. See the other options for such cases.
This method is suggested **wherever possible**.
### Option-3: IAsyncQueryableExecuter ### Option-3: IAsyncQueryableExecuter
@ -245,6 +265,17 @@ ABP Framework executes the query asynchronously using the actual database provid
This method is suggested; This method is suggested;
* If you want to develop your application code **without depending** on the database provider.
* If you are building a **reusable library** that doesn't have a database provider integration package, but needs to execute an `IQueryable<T>` object in some case. * If you are building a **reusable library** that doesn't have a database provider integration package, but needs to execute an `IQueryable<T>` object in some case.
For example, ABP Framework uses the `IAsyncQueryableExecuter` in the `CrudAppService` base class (see the [application services](Application-Services.md) document). For example, ABP Framework uses the `IAsyncQueryableExecuter` in the `CrudAppService` base class (see the [application services](Application-Services.md) document).
### Option-4: Custom Repository Methods
You can always create custom repository methods and use the database provider specific APIs, like async extension methods here. See [EF Core](Entity-Framework-Core.md) or [MongoDb](MongoDB.md) document for more info about the custom repositories.
This method is suggested;
* If you want to **completely isolate** your domain & application layers from the database provider.
* If you develop a **reusable [application module](Modules/Index.md)** and don't want to force to a specific database provider, which should be done as a [best practice](Best-Practices/Index.md).

2
docs/en/Tutorials/Part-10.md

@ -38,7 +38,7 @@ This tutorial has multiple versions based on your **UI** and **Database** prefer
We have created `Book` and `Author` functionalities for the book store application. However, currently there is no relation between these entities. We have created `Book` and `Author` functionalities for the book store application. However, currently there is no relation between these entities.
In this tutorial, we will establish a **1 to N** relation between the `Book` and the `Author`. In this tutorial, we will establish a **1 to N** relation between the `Author` and the `Book` entities.
## Add Relation to The Book Entity ## Add Relation to The Book Entity

10
docs/en/Tutorials/Part-2.md

@ -583,7 +583,7 @@ When you click to the Books menu item under the Book Store parent, you are being
We will use the [Blazorise library](https://blazorise.com/) as the UI component kit. It is a very powerful library that supports major HTML/CSS frameworks, including the Bootstrap. We will use the [Blazorise library](https://blazorise.com/) as the UI component kit. It is a very powerful library that supports major HTML/CSS frameworks, including the Bootstrap.
ABP Framework provides a generic base class, `BlazoriseCrudPageBase<...>`, to create CRUD style pages. This base class is compatible to the `ICrudAppService` that was used to build the `IBookAppService`. So, we can inherit from the `BlazoriseCrudPageBase` to automate the standard CRUD stuff. ABP Framework provides a generic base class, `AbpCrudPageBase<...>`, to create CRUD style pages. This base class is compatible to the `ICrudAppService` that was used to build the `IBookAppService`. So, we can inherit from the `AbpCrudPageBase` to automate the code behind for the standard CRUD stuff.
Open the `Books.razor` and replace the content as the following: Open the `Books.razor` and replace the content as the following:
@ -595,7 +595,7 @@ Open the `Books.razor` and replace the content as the following:
@using Acme.BookStore.Localization @using Acme.BookStore.Localization
@using Microsoft.Extensions.Localization @using Microsoft.Extensions.Localization
@inject IStringLocalizer<BookStoreResource> L @inject IStringLocalizer<BookStoreResource> L
@inherits BlazoriseCrudPageBase<IBookAppService, BookDto, Guid, PagedAndSortedResultRequestDto, CreateUpdateBookDto> @inherits AbpCrudPageBase<IBookAppService, BookDto, Guid, PagedAndSortedResultRequestDto, CreateUpdateBookDto>
<Card> <Card>
<CardHeader> <CardHeader>
@ -645,15 +645,15 @@ Open the `Books.razor` and replace the content as the following:
> If you see some syntax errors, you can ignore them if your application properly built and run. Visual Studio still has some bugs with Blazor. > If you see some syntax errors, you can ignore them if your application properly built and run. Visual Studio still has some bugs with Blazor.
* Inherited from the `BlazoriseCrudPageBase<IBookAppService, BookDto, Guid, PagedAndSortedResultRequestDto, CreateUpdateBookDto>` which implements all the CRUD details for us. * Inherited from the `AbpCrudPageBase<IBookAppService, BookDto, Guid, PagedAndSortedResultRequestDto, CreateUpdateBookDto>` which implements all the CRUD details for us.
* `Entities`, `TotalCount`, `PageSize`, `OnDataGridReadAsync` are defined in the base blass. * `Entities`, `TotalCount`, `PageSize`, `OnDataGridReadAsync` are defined in the base blass.
* Injected `IStringLocalizer<BookStoreResource>` (as `L` object) and used for localization. * Injected `IStringLocalizer<BookStoreResource>` (as `L` object) and used for localization.
While the code above pretty easy to understand, you can check the Blazorise [Card](https://blazorise.com/docs/components/card/) and [DataGrid](https://blazorise.com/docs/extensions/datagrid/) documents to understand them better. While the code above pretty easy to understand, you can check the Blazorise [Card](https://blazorise.com/docs/components/card/) and [DataGrid](https://blazorise.com/docs/extensions/datagrid/) documents to understand them better.
#### About the BlazoriseCrudPageBase #### About the AbpCrudPageBase
We will continue to benefit from the `BlazoriseCrudPageBase` for the books page. You could just inject the `IBookAppService` and perform all the server side calls yourself (thanks to the [Dynamic C# HTTP API Client Proxy](../API/Dynamic-CSharp-API-Clients.md) system of the ABP Framework). We will do it manually for the authors page to demonstrate how to call server side HTTP APIs in your Blazor applications. We will continue to benefit from the `AbpCrudPageBase` for the books page. You could just inject the `IBookAppService` and perform all the server side calls yourself (thanks to the [Dynamic C# HTTP API Client Proxy](../API/Dynamic-CSharp-API-Clients.md) system of the ABP Framework). We will do it manually for the authors page to demonstrate how to call server side HTTP APIs in your Blazor applications.
## Run the Final Application ## Run the Final Application

20
docs/en/Tutorials/Part-3.md

@ -1163,7 +1163,7 @@ Clicking the "Delete" action calls the `delete` method which then shows a confir
## Creating a New Book ## Creating a New Book
In this section, you will learn how to create a new modal dialog form to create a new book. Since we've inherited from the `BlazoriseCrudPage`, we only need to develop the view part. In this section, you will learn how to create a new modal dialog form to create a new book. Since we've inherited from the `AbpCrudPageBase`, we only need to develop the view part.
### Add "New Button" Button ### Add "New Button" Button
@ -1328,7 +1328,7 @@ We can now define a modal to edit the book. Add the following code to the end of
### AutoMapper Configuration ### AutoMapper Configuration
The base `BlazoriseCrudPage` uses the [object to object mapping](../Object-To-Object-Mapping.md) system to convert an incoming `BookDto` object to a `CreateUpdateBookDto` object. So, we need to define the mapping. The base `AbpCrudPageBase` uses the [object to object mapping](../Object-To-Object-Mapping.md) system to convert an incoming `BookDto` object to a `CreateUpdateBookDto` object. So, we need to define the mapping.
Open the `BookStoreBlazorAutoMapperProfile` inside the `Acme.BookStore.Blazor` project and change the content as the following: Open the `BookStoreBlazorAutoMapperProfile` inside the `Acme.BookStore.Blazor` project and change the content as the following:
@ -1382,7 +1382,7 @@ Here the complete code to create the book management CRUD page, that has been de
@using Acme.BookStore.Localization @using Acme.BookStore.Localization
@using Microsoft.Extensions.Localization @using Microsoft.Extensions.Localization
@inject IStringLocalizer<BookStoreResource> L @inject IStringLocalizer<BookStoreResource> L
@inherits BlazoriseCrudPageBase<IBookAppService, BookDto, Guid, PagedAndSortedResultRequestDto, CreateUpdateBookDto> @inherits AbpCrudPageBase<IBookAppService, BookDto, Guid, PagedAndSortedResultRequestDto, CreateUpdateBookDto>
<Card> <Card>
<CardHeader> <CardHeader>
@ -1392,8 +1392,10 @@ Here the complete code to create the book management CRUD page, that has been de
</Column> </Column>
<Column ColumnSize="ColumnSize.Is6"> <Column ColumnSize="ColumnSize.Is6">
<Paragraph Alignment="TextAlignment.Right"> <Paragraph Alignment="TextAlignment.Right">
<Button Color="Color.Primary" <Button Color="Color.Primary"
Clicked="OpenCreateModalAsync">@L["NewBook"]</Button> Clicked="OpenCreateModalAsync">
@L["NewBook"]
</Button>
</Paragraph> </Paragraph>
</Column> </Column>
</Row> </Row>
@ -1406,10 +1408,10 @@ Here the complete code to create the book management CRUD page, that has been de
ShowPager="true" ShowPager="true"
PageSize="PageSize"> PageSize="PageSize">
<DataGridColumns> <DataGridColumns>
<DataGridColumn Width="150px" <DataGridColumn Width="150px"
TItem="BookDto" TItem="BookDto"
Field="@nameof(BookDto.Id)" Field="@nameof(BookDto.Id)"
Sortable="false" Sortable="false"
Caption="@L["Actions"]"> Caption="@L["Actions"]">
<DisplayTemplate> <DisplayTemplate>
<Dropdown> <Dropdown>
@ -1434,7 +1436,7 @@ Here the complete code to create the book management CRUD page, that has been de
Field="@nameof(BookDto.Type)" Field="@nameof(BookDto.Type)"
Caption="@L["Type"]"> Caption="@L["Type"]">
<DisplayTemplate> <DisplayTemplate>
@L[$"Enum:BookType:{(int) context.Type}"] @L[$"Enum:BookType:{(int)context.Type}"]
</DisplayTemplate> </DisplayTemplate>
</DataGridColumn> </DataGridColumn>
<DataGridColumn TItem="BookDto" <DataGridColumn TItem="BookDto"

3
docs/en/Tutorials/Part-4.md

@ -75,9 +75,12 @@ If you had created a data seed contributor as described in the [first part](Part
Add a new test class, named `BookAppService_Tests` in the `Books` namespace (folder) of the `Acme.BookStore.Application.Tests` project: Add a new test class, named `BookAppService_Tests` in the `Books` namespace (folder) of the `Acme.BookStore.Application.Tests` project:
````csharp ````csharp
using System;
using System.Linq;
using System.Threading.Tasks; using System.Threading.Tasks;
using Shouldly; using Shouldly;
using Volo.Abp.Application.Dtos; using Volo.Abp.Application.Dtos;
using Volo.Abp.Validation;
using Xunit; using Xunit;
namespace Acme.BookStore.Books namespace Acme.BookStore.Books

8
docs/en/Tutorials/Part-5.md

@ -460,7 +460,7 @@ Open the `/src/app/book/book.component.html` file and replace the edit and delet
### Authorize the Razor Component ### Authorize the Razor Component
Open the `/Pages/Books.razor` file in the `Acme.BookStore.Blazor` project and add an `Authorize` attribute just after the `@page` directive, as shown below: Open the `/Pages/Books.razor` file in the `Acme.BookStore.Blazor` project and add an `Authorize` attribute just after the `@page` directive and the following namespace imports (`@using` lines), as shown below:
````html ````html
@page "/books" @page "/books"
@ -518,7 +518,9 @@ Wrap the *New Book* button by an `if` block as shown below:
@if (canCreateBook) @if (canCreateBook)
{ {
<Button Color="Color.Primary" <Button Color="Color.Primary"
Clicked="OpenCreateModalAsync">@L["NewBook"]</Button> Clicked="OpenCreateModalAsync">
@L["NewBook"]
</Button>
} }
```` ````
@ -545,7 +547,7 @@ As similar to the *New Book* button, we can use `if` blocks to conditionally sho
You can run and test the permissions. Remove a book related permission from the admin role to see the related button/action disappears from the UI. You can run and test the permissions. Remove a book related permission from the admin role to see the related button/action disappears from the UI.
However, ABP Framework caches the permissions of the current user in the client side. So, when you change a permission for yourself, you need to manually **refresh the page** to take the effect. If you don't refresh and try to use the prohibited action you get an HTTP 403 (forbidden) response from the server. **ABP Framework caches the permissions** of the current user in the client side. So, when you change a permission for yourself, you need to manually **refresh the page** to take the effect. If you don't refresh and try to use the prohibited action you get an HTTP 403 (forbidden) response from the server.
> Changing a permission for a role or user immediately available on the server side. So, this cache system doesn't cause any security problem. > Changing a permission for a role or user immediately available on the server side. So, this cache system doesn't cause any security problem.

4
docs/en/Tutorials/Part-7.md

@ -74,6 +74,10 @@ Open the **Package Manager Console** on Visual Studio and ensure that the **Defa
Run the following command to create a new database migration: Run the following command to create a new database migration:
````bash
Add-Migration "Added_Authors"
````
![bookstore-add-migration-authors](images/bookstore-add-migration-authors.png) ![bookstore-add-migration-authors](images/bookstore-add-migration-authors.png)
This will create a new migration class. Then run the `Update-Database` command to create the table on the database. This will create a new migration class. Then run the `Update-Database` command to create the table on the database.

14
docs/en/Tutorials/Part-9.md

@ -1177,6 +1177,20 @@ We should complete the localizations we've used above. Open the `en.json` file u
"NewAuthor": "New author" "NewAuthor": "New author"
```` ````
### Run the Application
Run and login to the application. **If you don't see the Authors menu item under the Book Store menu, that means you don't have the permission yet.** Go to the `identity/roles` page, click to the *Actions* button and select the *Permissions* action for the **admin role**:
![bookstore-author-permissions](images/bookstore-author-permissions.png)
As you see, the admin role has no *Author Management* permissions yet. Click to the checkboxes and save the modal to grant the necessary permissions. You will see the *Authors* menu item under the *Book Store* in the main menu, after **refreshing the page**:
![bookstore-authors-page](images/bookstore-authors-blazor-ui.png)
That's all! This is a fully working CRUD page, you can create, edit and delete the authors.
> **Tip**: If you run the `.DbMigrator` console application after defining a new permission, it automatically grants these new permissions to the admin role and you don't need to manually grant the permissions yourself.
{{end}} {{end}}
## The Next Part ## The Next Part

BIN
docs/en/Tutorials/images/bookstore-authors-blazor-ui.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

24
docs/en/UI/AspNetCore/JavaScript-API/Auth.md

@ -0,0 +1,24 @@
# ASP.NET Core MVC / Razor Pages UI: JavaScript Auth API
Auth API allows you to check permissions (policies) for the current user in the client side. In this way, you can conditionally show/hide UI parts or perform your client side logic based on the current permissions.
> This document only explains the JavaScript API. See the [authorization document](../../../Authorization.md) to understand the ABP authorization & permission system.
## Basic Usage
`abp.auth.isGranted(...)` function is used to check if a permission/policy has granted or not:
````js
if (abp.auth.isGranted('DeleteUsers')) {
//TODO: Delete the user
} else {
alert("You don't have permission to delete a user!");
}
````
## Other Fields & Functions
* ` abp.auth.isAnyGranted(...)`: Gets one or more permission/policy names and returns `true` if at least one of them has granted.
* `abp.auth.areAllGranted(...)`: Gets one or more permission/policy names and returns `true` if all of them of them have granted.
* `abp.auth.policies`: This is an object where its keys are the permission/policy names. You can find all permission/policy names here.
* `abp.auth.grantedPolicies`: This is an object where its keys are the permission/policy names. You can find the granted permission/policy names here.

56
docs/en/UI/AspNetCore/JavaScript-API/Block-Busy.md

@ -0,0 +1,56 @@
# ASP.NET Core MVC / Razor Pages UI: JavaScript UI Block/Busy API
UI Block API disables (blocks) the page or a part of the page.
## Basic Usage
**Example: Block (disable) the complete page**
````js
abp.ui.block();
````
**Example: Block (disable) an HTML element**
````js
abp.ui.block('#MyContainer');
````
**Example: Enables the previously blocked element or page:**
````js
abp.ui.unblock();
````
## Options
`abp.ui.block()` method can get an options object which may contain the following fields:
* `elm`: An optional selector to find the element to be blocked (e.g. `#MyContainerId`). If not provided, the entire page is blocked. The selector can also be directly passed to the `block()` method as shown above.
* `busy`: Set to `true` to show a progress indicator on the blocked area.
* `promise`: A promise object with `always` or `finally` callbacks. This can be helpful if you want to automatically unblock the blocked area when a deferred operation completes.
**Example: Block an element with busy indicator**
````js
abp.ui.block({
elm: '#MySection',
busy: true
});
````
The resulting UI will look like below:
![ui-busy](../../../images/ui-busy.png)
## setBusy
`abp.ui.setBusy(...)` and `abp.ui.clearBusy()` are shortcut functions if you want to use the block with `busy` option.
**Example: Block with busy**
````js
abp.ui.setBusy('#MySection');
````
Then you can use `abp.ui.clearBusy();` to re-enable the busy area/page.

49
docs/en/UI/AspNetCore/JavaScript-API/CurrentUser.md

@ -0,0 +1,49 @@
# ASP.NET Core MVC / Razor Pages UI: JavaScript CurrentUser API
`abp.currentUser` is an object that contains information about the current user of the application.
> This document only explains the JavaScript API. See the [CurrentUser document](../../../CurrentUser.md) to get information about the current user in the server side.
## Authenticated User
If the user was authenticated, this object will be something like below:
````js
{
isAuthenticated: true,
id: "34f1f4a7-13cc-4b91-84d1-b91c87afa95f",
tenantId: null,
userName: "john",
name: "John",
surName: "Nash",
email: "john.nash@abp.io",
emailVerified: true,
phoneNumber: null,
phoneNumberVerified: false,
roles: ["moderator","supporter"]
}
````
So, `abp.currentUser.userName` returns `john` in this case.
## Anonymous User
If the user was not authenticated, this object will be something like below:
````js
{
isAuthenticated: false,
id: null,
tenantId: null,
userName: null,
name: null,
surName: null,
email: null,
emailVerified: false,
phoneNumber: null,
phoneNumberVerified: false,
roles: []
}
````
You can check `abp.currentUser.isAuthenticated` to understand if the use was authenticated or not.

117
docs/en/UI/AspNetCore/JavaScript-API/DOM.md

@ -0,0 +1,117 @@
# ASP.NET Core MVC / Razor Pages UI: JavaScript DOM API
`abp.dom` (Document Object Model) provides events that you can subscribe to get notified when elements dynamically added to and removed from the page (DOM).
It is especially helpful if you want to initialize the new loaded elements. This is generally needed when you dynamically add elements to DOM (for example, get some HTML elements via AJAX) after page initialization.
> ABP uses the [MutationObserver](https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver) to observe the changes made on the DOM.
## Node Events
### onNodeAdded
This event is triggered when an element is added to the DOM. Example:
````js
abp.dom.onNodeAdded(function(args){
console.log(args.$el);
});
````
`args` object has the following fields;
* `$el`: The JQuery selection to get the new element inserted to the DOM.
### onNodeRemoved
This event is triggered when an element is removed from the DOM. Example:
````js
abp.dom.onNodeRemoved(function(args){
console.log(args.$el);
});
````
`args` object has the following fields;
* `$el`: The JQuery selection to get the element removed from the DOM.
## Pre-Build Initializers
ABP Framework is using the DOM events to initialize some kind of HTML elements when they are added to the DOM after than the page was already initialized.
> Note that the same initializers also work if these elements were already included in the initial DOM. So, whether they are initially or lazy loaded, they work as expected.
### Form Initializer
The Form initializer (defined as `abp.dom.initializers.initializeForms`) initializes the lazy loaded forms;
* Automatically enabled the `unobtrusive` validation on the form.
* Can automatically show a confirmation message when you submit the form. To enable this feature, just add `data-confirm` attribute with a message (like `data-confirm="Are you sure?"`) to the `form` element.
* If the `form` element has `data-ajaxForm="true"` attribute, then automatically calls the `.abpAjaxForm()` on the `form` element, to make the form posted via AJAX.
See the [Forms & Validation](../Forms-Validation.md) document for more.
### Script Initializer
Script initializer (`abp.dom.initializers.initializeScript`) can execute a JavaScript code for a DOM element.
**Example: Lazy load a component and execute some code when the element has loaded**
Assume that you've a container to load the element inside:
````html
<div id="LazyComponent"></div>
````
And this is the component that will be loaded via AJAX from the server and inserted into the container:
````html
<div data-script-class="MyCustomClass">
<p>Sample message</p>
</div>
````
`data-script-class="MyCustomClass"` indicates the JavaScript class that will be used to perform some logic on this element:
`MyCustomClass` is a global object defined as shown below:
````js
MyCustomClass = function(){
function initDom($el){
$el.css('color', 'red');
}
return {
initDom: initDom
}
};
````
`initDom` is the function that is called by the ABP Framework. The `$el` argument is the loaded HTML element as a JQuery selection.
Finally, you can load the component inside the container after an AJAX call:
````js
$(function () {
setTimeout(function(){
$.get('/get-my-element').then(function(response){
$('#LazyComponent').html(response);
});
}, 2000);
});
````
Script Initialization system is especially helpful if you don't know how and when the component will be loaded into the DOM. This can be possible if you've developed a reusable UI component in a library and you want the application developer shouldn't care how to initialize the component in different use cases.
> Script initialization doesn't work if the component was loaded in the initial DOM. In this case, you are responsible to initialize it.
### Other Initializers
The following Bootstrap components and libraries are automatically initialized when they are added to the DOM:
* Tooltip
* Popover
* Timeage

88
docs/en/UI/AspNetCore/JavaScript-API/Events.md

@ -0,0 +1,88 @@
# ASP.NET Core MVC / Razor Pages UI: JavaScript Events API
`abp.event` object is a simple service that is used to publish and subscribe to global events **in the browser**.
> This API is not related to server side local or distributed events. It works in the browser boundaries to make the UI components (code parts) communicate in a loosely coupled way.
## Basic Usage
### Publishing Events
Use `abp.event.trigger` to publish events.
**Example: Publish a *Basket Updated* event**
````js
abp.event.trigger('basketUpdated');
````
This will trigger all the subscribed callbacks.
### Subscribing to the Events
Use `abp.event.on` to subscribe to events.
**Example: Consume the *Basket Updated* event**
````js
abp.event.on('basketUpdated', function() {
console.log('Handled the basketUpdated event...');
});
````
You start to get events after you subscribe to the event.
### Unsubscribing from the Events
If you need to unsubscribe from a pre-subscribed event, you can use the `abp.event.off(eventName, callback)` function. In this case, you have the callback as a separate function declaration.
**Example: Subscribe & Unsubscribe**
````js
function onBasketUpdated() {
console.log('Handled the basketUpdated event...');
}
//Subscribe
abp.event.on('basketUpdated', onBasketUpdated);
//Unsubscribe
abp.event.off('basketUpdated', onBasketUpdated);
````
You don't get events after you unsubscribe from the event.
## Event Arguments
You can pass arguments (of any count) to the `trigger` method and get them in the subscription callback.
**Example: Add the basket as the event argument**
````js
//Subscribe to the event
abp.event.on('basketUpdated', function(basket) {
console.log('The new basket object: ');
console.log(basket);
});
//Trigger the event
abp.event.trigger('basketUpdated', {
items: [
{
"productId": "123",
"count": 2
},
{
"productId": "832",
"count": 1
}
]
});
````
### Multiple Arguments
If you want to pass multiple arguments, you can pass like `abp.event.on('basketUpdated', arg0, arg1, agr2)`. Then you can add the same argument list to the callback function on the subscriber side.
> **Tip:** Alternatively, you can send a single object that has a separate field for each argument. This makes easier to extend/change the event arguments in the future without breaking the subscribers.

15
docs/en/UI/AspNetCore/JavaScript-API/Features.md

@ -0,0 +1,15 @@
# ASP.NET Core MVC / Razor Pages UI: JavaScript Features API
`abp.features` API allows you to check features or get the values of the features on the client side. You can read the current value of a feature in the client side only if it is allowed by the feature definition (on the server side).
> This document only explains the JavaScript API. See the [Features](../../../Features.md) document to understand the ABP Features system.
## Basic Usage
`abp.features.values` can be used to access to the all feature values.
````js
var excelExportFeatureValue = abp.features.values["ExportingToExcel"];
````
Then you can check the value of the feature to perform your logic.

28
docs/en/UI/AspNetCore/JavaScript-API/Index.md

@ -4,18 +4,16 @@ ABP provides a set of JavaScript APIs for ASP.NET Core MVC / Razor Pages applica
## APIs ## APIs
* [abp.ajax](Ajax.md) * [AJAX](Ajax.md)
* abp.auth * [Auth](Auth.md)
* abp.currentUser * [CurrentUser](CurrentUser.md)
* abp.dom * [DOM](DOM.md)
* abp.event * [Events](Events.md)
* abp.features * [Features](Features.md)
* [abp.localization](Localization.md) * [Localization](Localization.md)
* abp.log * [Logging](Logging.md)
* [abp.message](Message.md) * [ResourceLoader](ResourceLoader.md)
* [abp.notify](Notify.md) * [Settings](Settings.md)
* abp.security * [UI Block/Busy](Block-Busy.md)
* [abp.setting](Settings.md) * [UI Message](Message.md)
* abp.ui * [UI Notification](Notify.md)
* abp.utils
* abp.ResourceLoader

49
docs/en/UI/AspNetCore/JavaScript-API/Logging.md

@ -1,3 +1,50 @@
# ASP.NET Core MVC / Razor Pages UI: JavaScript Logging API # ASP.NET Core MVC / Razor Pages UI: JavaScript Logging API
TODO `abp.log` API is used to write simple logs in the client side.
> The logs are written to console, using the `console.log`, by default.
> This document is for simple client side logging. See the [Logging](../../../Logging.md) document for server side logging system.
## Basic Usage
Use one of the `abp.log.xxx(...)` methods based on the severity of your log message.
````js
abp.log.debug("Some debug log here..."); //Logging a simple debug message
abp.log.info({ name: "john", age: 42 }); //Logging an object as an information log
abp.log.warn("A warning message"); //Logging a warning message
abp.log.error('An error happens...'); //Error message
abp.log.fatal('Network connection has gone away!'); //Fatal error
````
## Log Levels
There are 5 levels for a log message:
* DEBUG = 1
* INFO = 2
* WARN = 3
* ERROR = 4
* FATAL = 5
These are defined in the `abp.log.levels` object (like `abp.log.levels.WARN`).
### Changing the Current Log Level
You can control the log level as shown below:
````js
abp.log.level = abp.log.levels.WARN;
````
Default log level is `DEBUG`.
### Logging with Specifying the Level
Instead of calling `abp.log.info(...)` function, you can use the `abp.log.log` by specifying the log level as a parameter:
````js
abp.log.log("log message...", abp.log.levels.INFO);
````

40
docs/en/UI/AspNetCore/JavaScript-API/ResourceLoader.md

@ -0,0 +1,40 @@
# ASP.NET Core MVC / Razor Pages UI: JavaScript Resource Loader API
`abp.ResourceLoader` is a service that can load a JavaScript or CSS file on demand. It guarantees to load the file only once even if you request multiple times.
## Loading Script Files
`abp.ResourceLoader.loadScript(...)` function **loads** a JavaScript file from the server and **executes** it.
**Example: Load a JavaScript file**
````js
abp.ResourceLoader.loadScript('/Pages/my-script.js');
````
### Parameters
`loadScript` function can get three parameters;
* `url` (required, `string`): The URL of the script file to be loaded.
* `loadCallback` (optional, `function`): A callback function that is called once the script is loaded & executed. In this callback you can safely use the code in the script file. This callback is called even if the file was loaded before.
* `failCallback` (optional, `function`): A callback function that is called if loading the script fails.
**Example: Provide the `loadCallback` argument**
````js
abp.ResourceLoader.loadScript('/Pages/my-script.js', function() {
console.log('successfully loaded :)');
});
````
## Loading Style Files
`abp.ResourceLoader.loadStyle(...)` function adds a `link` element to the `head` of the document for the given URL, so the CSS file is automatically loaded by the browser.
**Example: Load a CSS file**
````js
abp.ResourceLoader.loadStyle('/Pages/my-styles.css');
````

32
docs/en/docs-nav.json

@ -463,10 +463,22 @@
"text": "Localization", "text": "Localization",
"path": "UI/AspNetCore/JavaScript-API/Localization.md" "path": "UI/AspNetCore/JavaScript-API/Localization.md"
}, },
{
"text": "Auth",
"path": "UI/AspNetCore/JavaScript-API/Auth.md"
},
{
"text": "Current User",
"path": "UI/AspNetCore/JavaScript-API/CurrentUser.md"
},
{ {
"text": "Settings", "text": "Settings",
"path": "UI/AspNetCore/JavaScript-API/Settings.md" "path": "UI/AspNetCore/JavaScript-API/Settings.md"
}, },
{
"text": "Features",
"path": "UI/AspNetCore/JavaScript-API/Features.md"
},
{ {
"text": "AJAX", "text": "AJAX",
"path": "UI/AspNetCore/JavaScript-API/Ajax.md" "path": "UI/AspNetCore/JavaScript-API/Ajax.md"
@ -478,6 +490,26 @@
{ {
"text": "Notify", "text": "Notify",
"path": "UI/AspNetCore/JavaScript-API/Notify.md" "path": "UI/AspNetCore/JavaScript-API/Notify.md"
},
{
"text": "Block/Busy",
"path": "UI/AspNetCore/JavaScript-API/Block-Busy.md"
},
{
"text": "Events",
"path": "UI/AspNetCore/JavaScript-API/Events.md"
},
{
"text": "DOM",
"path": "UI/AspNetCore/JavaScript-API/DOM.md"
},
{
"text": "Logging",
"path": "UI/AspNetCore/JavaScript-API/Logging.md"
},
{
"text": "Resource Loader",
"path": "UI/AspNetCore/JavaScript-API/ResourceLoader.md"
} }
] ]
}, },

BIN
docs/en/images/ui-busy.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

4
framework/src/Volo.Abp.AspNetCore.Authentication.JwtBearer/Volo.Abp.AspNetCore.Authentication.JwtBearer.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<AssemblyName>Volo.Abp.AspNetCore.Authentication.JwtBearer</AssemblyName> <AssemblyName>Volo.Abp.AspNetCore.Authentication.JwtBearer</AssemblyName>
<PackageId>Volo.Abp.AspNetCore.Authentication.JwtBearer</PackageId> <PackageId>Volo.Abp.AspNetCore.Authentication.JwtBearer</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
@ -19,7 +19,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="3.1.8" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="5.0.0-rc.2.*" />
</ItemGroup> </ItemGroup>
</Project> </Project>

2
framework/src/Volo.Abp.AspNetCore.Authentication.OAuth/Volo.Abp.AspNetCore.Authentication.OAuth.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<AssemblyName>Volo.Abp.AspNetCore.Authentication.OAuth</AssemblyName> <AssemblyName>Volo.Abp.AspNetCore.Authentication.OAuth</AssemblyName>
<PackageId>Volo.Abp.AspNetCore.Authentication.OAuth</PackageId> <PackageId>Volo.Abp.AspNetCore.Authentication.OAuth</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>

4
framework/src/Volo.Abp.AspNetCore.Authentication.OpenIdConnect/Volo.Abp.AspNetCore.Authentication.OpenIdConnect.csproj

@ -4,12 +4,12 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<RootNamespace /> <RootNamespace />
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="3.1.8" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="5.0.0-rc.2.*" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

3
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme.csproj

@ -4,8 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<RazorLangVersion>3.0</RazorLangVersion>
<PackageId>Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme</PackageId> <PackageId>Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme</PackageId>
</PropertyGroup> </PropertyGroup>

3
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.Theming/Volo.Abp.AspNetCore.Components.WebAssembly.Theming.csproj

@ -4,8 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<RazorLangVersion>3.0</RazorLangVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>

7
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Microsoft/AspNetCore/Components/WebAssembly/Hosting/AbpWebAssemblyHostBuilderExtensions.cs

@ -1,6 +1,7 @@
using System; using System;
using System.Globalization; using System.Globalization;
using System.Reflection; using System.Reflection;
using System.Runtime.CompilerServices;
using System.Threading.Tasks; using System.Threading.Tasks;
using JetBrains.Annotations; using JetBrains.Annotations;
using Microsoft.Extensions.Configuration; using Microsoft.Extensions.Configuration;
@ -21,6 +22,12 @@ namespace Microsoft.AspNetCore.Components.WebAssembly.Hosting
{ {
Check.NotNull(builder, nameof(builder)); Check.NotNull(builder, nameof(builder));
// Related this commit(https://github.com/dotnet/aspnetcore/commit/b99d805bc037fcac56afb79abeb7d5a43141c85e)
// Microsoft.AspNetCore.Blazor.BuildTools has been removed in net 5.0.
// This call may be removed when we find a suitable solution.
// System.Runtime.CompilerServices.AsyncStateMachineAttribute
Castle.DynamicProxy.Generators.AttributesToAvoidReplicating.Add<AsyncStateMachineAttribute>();
builder.Services.AddSingleton<IConfiguration>(builder.Configuration); builder.Services.AddSingleton<IConfiguration>(builder.Configuration);
builder.Services.AddSingleton(builder); builder.Services.AddSingleton(builder);

6
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo.Abp.AspNetCore.Components.WebAssembly.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<AssemblyName>Volo.Abp.AspNetCore.Components.WebAssembly</AssemblyName> <AssemblyName>Volo.Abp.AspNetCore.Components.WebAssembly</AssemblyName>
<PackageId>Volo.Abp.AspNetCore.Components.WebAssembly</PackageId> <PackageId>Volo.Abp.AspNetCore.Components.WebAssembly</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
@ -20,8 +20,8 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="3.2.1" /> <PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="5.0.0-rc.2.*" />
<PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="3.1.8" /> <PackageReference Include="Microsoft.AspNetCore.Components.Authorization" Version="5.0.0-rc.2.*" />
<PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" /> <PackageReference Include="Microsoft.AspNetCore.WebUtilities" Version="2.2.0" />
</ItemGroup> </ItemGroup>

13
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/AbpExceptionHandlingLogger.cs

@ -4,10 +4,9 @@ using Microsoft.Extensions.Logging;
namespace Volo.Abp.AspNetCore.Components.WebAssembly.ExceptionHandling namespace Volo.Abp.AspNetCore.Components.WebAssembly.ExceptionHandling
{ {
public class AbpExceptionHandlingLogger : ILogger, IDisposable public class AbpExceptionHandlingLogger : ILogger
{ {
private readonly IServiceCollection _serviceCollection; private readonly IServiceCollection _serviceCollection;
private IServiceScope _serviceScope;
private IUserExceptionInformer _userExceptionInformer; private IUserExceptionInformer _userExceptionInformer;
public AbpExceptionHandlingLogger(IServiceCollection serviceCollection) public AbpExceptionHandlingLogger(IServiceCollection serviceCollection)
@ -39,7 +38,7 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly.ExceptionHandling
return; return;
} }
_userExceptionInformer.InformAsync(new UserExceptionInformerContext(exception)); _userExceptionInformer.Inform(new UserExceptionInformerContext(exception));
} }
protected virtual void TryInitialize() protected virtual void TryInitialize()
@ -50,8 +49,7 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly.ExceptionHandling
return; return;
} }
_serviceScope = serviceProvider.CreateScope(); _userExceptionInformer = serviceProvider.GetRequiredService<IUserExceptionInformer>();
_userExceptionInformer = _serviceScope.ServiceProvider.GetRequiredService<IUserExceptionInformer>();
} }
public virtual bool IsEnabled(LogLevel logLevel) public virtual bool IsEnabled(LogLevel logLevel)
@ -63,10 +61,5 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly.ExceptionHandling
{ {
return NullDisposable.Instance; return NullDisposable.Instance;
} }
public virtual void Dispose()
{
_serviceScope?.Dispose();
}
} }
} }

2
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/AbpExceptionHandlingLoggerProvider.cs

@ -32,7 +32,7 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly.ExceptionHandling
public void Dispose() public void Dispose()
{ {
_logger.Dispose();
} }
} }
} }

7
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/IUserExceptionInformer.cs

@ -1,10 +1,7 @@
using System; namespace Volo.Abp.AspNetCore.Components.WebAssembly.ExceptionHandling
using System.Threading.Tasks;
namespace Volo.Abp.AspNetCore.Components.WebAssembly.ExceptionHandling
{ {
public interface IUserExceptionInformer public interface IUserExceptionInformer
{ {
Task InformAsync(UserExceptionInformerContext context); void Inform(UserExceptionInformerContext context);
} }
} }

33
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/ExceptionHandling/UserExceptionInformer.cs

@ -1,5 +1,7 @@
using System; using System;
using System.Threading.Tasks; using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Volo.Abp.AspNetCore.ExceptionHandling; using Volo.Abp.AspNetCore.ExceptionHandling;
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
using Volo.Abp.Http; using Volo.Abp.Http;
@ -9,19 +11,32 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly.ExceptionHandling
{ {
public class UserExceptionInformer : IUserExceptionInformer, ITransientDependency public class UserExceptionInformer : IUserExceptionInformer, ITransientDependency
{ {
public ILogger<UserExceptionInformer> Logger { get; set; }
protected IUiMessageService MessageService { get; } protected IUiMessageService MessageService { get; }
protected IExceptionToErrorInfoConverter ExceptionToErrorInfoConverter { get; } protected IExceptionToErrorInfoConverter ExceptionToErrorInfoConverter { get; }
public UserExceptionInformer(IUiMessageService messageService, IExceptionToErrorInfoConverter exceptionToErrorInfoConverter) public UserExceptionInformer(
IUiMessageService messageService,
IExceptionToErrorInfoConverter exceptionToErrorInfoConverter)
{ {
MessageService = messageService; MessageService = messageService;
ExceptionToErrorInfoConverter = exceptionToErrorInfoConverter; ExceptionToErrorInfoConverter = exceptionToErrorInfoConverter;
Logger = NullLogger<UserExceptionInformer>.Instance;
} }
public virtual async Task InformAsync(UserExceptionInformerContext context) public void Inform(UserExceptionInformerContext context)
{ {
var errorInfo = GetErrorInfo(context); var errorInfo = GetErrorInfo(context);
await ShowErrorInfoAsync(errorInfo);
if (errorInfo.Details.IsNullOrEmpty())
{
//TODO: Should we introduce MessageService.Error (sync) method instead of such a usage (without await)..?
MessageService.ErrorAsync(errorInfo.Message);
}
else
{
MessageService.ErrorAsync(errorInfo.Details, errorInfo.Message);
}
} }
protected virtual RemoteServiceErrorInfo GetErrorInfo(UserExceptionInformerContext context) protected virtual RemoteServiceErrorInfo GetErrorInfo(UserExceptionInformerContext context)
@ -33,17 +48,5 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly.ExceptionHandling
return ExceptionToErrorInfoConverter.Convert(context.Exception, false); return ExceptionToErrorInfoConverter.Convert(context.Exception, false);
} }
protected virtual async Task ShowErrorInfoAsync(RemoteServiceErrorInfo errorInfo)
{
if (errorInfo.Details.IsNullOrEmpty())
{
await MessageService.ErrorAsync(errorInfo.Message);
}
else
{
await MessageService.ErrorAsync(errorInfo.Details, errorInfo.Message);
}
}
} }
} }

2
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/WebAssemblyCurrentTenantAccessor.cs → framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/MultiTenancy/WebAssemblyCurrentTenantAccessor.cs

@ -1,7 +1,7 @@
using Volo.Abp.DependencyInjection; using Volo.Abp.DependencyInjection;
using Volo.Abp.MultiTenancy; using Volo.Abp.MultiTenancy;
namespace Volo.Abp.AspNetCore.Components.WebAssembly namespace Volo.Abp.AspNetCore.Components.WebAssembly.MultiTenancy
{ {
[Dependency(ReplaceServices = true)] [Dependency(ReplaceServices = true)]
public class WebAssemblyCurrentTenantAccessor : ICurrentTenantAccessor, ISingletonDependency public class WebAssemblyCurrentTenantAccessor : ICurrentTenantAccessor, ISingletonDependency

45
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/WebAssemblyRemoteTenantStore.cs → framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/MultiTenancy/WebAssemblyRemoteTenantStore.cs

@ -6,44 +6,55 @@ using Volo.Abp.Http.Client.DynamicProxying;
using Volo.Abp.MultiTenancy; using Volo.Abp.MultiTenancy;
using Volo.Abp.Threading; using Volo.Abp.Threading;
namespace Volo.Abp.AspNetCore.Components.WebAssembly namespace Volo.Abp.AspNetCore.Components.WebAssembly.MultiTenancy
{ {
public class WebAssemblyRemoteTenantStore : ITenantStore, ITransientDependency public class WebAssemblyRemoteTenantStore : ITenantStore, ITransientDependency
{ {
protected IHttpClientProxy<IAbpTenantAppService> Proxy { get; } protected IHttpClientProxy<IAbpTenantAppService> Proxy { get; }
protected WebAssemblyRemoteTenantStoreCache Cache { get; }
public WebAssemblyRemoteTenantStore( public WebAssemblyRemoteTenantStore(
IHttpClientProxy<IAbpTenantAppService> proxy) IHttpClientProxy<IAbpTenantAppService> proxy,
WebAssemblyRemoteTenantStoreCache cache)
{ {
Proxy = proxy; Proxy = proxy;
Cache = cache;
} }
public async Task<TenantConfiguration> FindAsync(string name) public async Task<TenantConfiguration> FindAsync(string name)
{ {
//TODO: Cache var cached = Cache.Find(name);
if (cached != null)
{
return cached;
}
return CreateTenantConfiguration(await Proxy.Service.FindTenantByNameAsync(name)); var tenant = CreateTenantConfiguration(await Proxy.Service.FindTenantByNameAsync(name));
Cache.Set(tenant);
return tenant;
} }
public async Task<TenantConfiguration> FindAsync(Guid id) public async Task<TenantConfiguration> FindAsync(Guid id)
{ {
//TODO: Cache var cached = Cache.Find(id);
if (cached != null)
{
return cached;
}
return CreateTenantConfiguration(await Proxy.Service.FindTenantByIdAsync(id)); var tenant = CreateTenantConfiguration(await Proxy.Service.FindTenantByIdAsync(id));
Cache.Set(tenant);
return tenant;
} }
public TenantConfiguration Find(string name) public TenantConfiguration Find(string name)
{ {
//TODO: Cache return AsyncHelper.RunSync(() => FindAsync(name));
return AsyncHelper.RunSync(async () => CreateTenantConfiguration(await Proxy.Service.FindTenantByNameAsync(name)));
} }
public TenantConfiguration Find(Guid id) public TenantConfiguration Find(Guid id)
{ {
//TODO: Cache return AsyncHelper.RunSync(() => FindAsync(id));
return AsyncHelper.RunSync(async () => CreateTenantConfiguration(await Proxy.Service.FindTenantByIdAsync(id)));
} }
protected virtual TenantConfiguration CreateTenantConfiguration(FindTenantResultDto tenantResultDto) protected virtual TenantConfiguration CreateTenantConfiguration(FindTenantResultDto tenantResultDto)
@ -55,15 +66,5 @@ namespace Volo.Abp.AspNetCore.Components.WebAssembly
return new TenantConfiguration(tenantResultDto.TenantId.Value, tenantResultDto.Name); 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}";
}
} }
} }

35
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/MultiTenancy/WebAssemblyRemoteTenantStoreCache.cs

@ -0,0 +1,35 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Volo.Abp.DependencyInjection;
using Volo.Abp.MultiTenancy;
namespace Volo.Abp.AspNetCore.Components.WebAssembly.MultiTenancy
{
public class WebAssemblyRemoteTenantStoreCache : IScopedDependency
{
protected readonly List<TenantConfiguration> CachedTenants = new List<TenantConfiguration>();
public virtual TenantConfiguration Find(string name)
{
return CachedTenants.FirstOrDefault(t => t.Name == name);
}
public virtual TenantConfiguration Find(Guid id)
{
return CachedTenants.FirstOrDefault(t => t.Id == id);
}
public virtual void Set(TenantConfiguration tenant)
{
var existingTenant = Find(tenant.Id);
if (existingTenant != null)
{
existingTenant.Name = tenant.Name;
return;
}
CachedTenants.Add(tenant);
}
}
}

34
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/NullUiMessageService.cs

@ -1,34 +0,0 @@
using System;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
namespace Volo.Abp.AspNetCore.Components.WebAssembly
{
public class NullUiMessageService : IUiMessageService, ITransientDependency
{
public Task InfoAsync(string message, string title = null, Action<UiMessageOptions> options = null)
{
return Task.CompletedTask;
}
public Task SuccessAsync(string message, string title = null, Action<UiMessageOptions> options = null)
{
return Task.CompletedTask;
}
public Task WarnAsync(string message, string title = null, Action<UiMessageOptions> options = null)
{
return Task.CompletedTask;
}
public Task ErrorAsync(string message, string title = null, Action<UiMessageOptions> options = null)
{
return Task.CompletedTask;
}
public Task<bool> ConfirmAsync(string message, string title = null, Action<UiMessageOptions> options = null)
{
return Task.FromResult(true);
}
}
}

5
framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/UiMessageService.cs → framework/src/Volo.Abp.AspNetCore.Components.WebAssembly/Volo/Abp/AspNetCore/Components/WebAssembly/SimpleUiMessageService.cs

@ -5,12 +5,11 @@ using Volo.Abp.DependencyInjection;
namespace Volo.Abp.AspNetCore.Components.WebAssembly namespace Volo.Abp.AspNetCore.Components.WebAssembly
{ {
//TODO: Implement with sweetalert in a new package public class SimpleUiMessageService : IUiMessageService, ITransientDependency
public class UiMessageService : IUiMessageService, ITransientDependency
{ {
protected IJSRuntime JsRuntime { get; } protected IJSRuntime JsRuntime { get; }
public UiMessageService(IJSRuntime jsRuntime) public SimpleUiMessageService(IJSRuntime jsRuntime)
{ {
JsRuntime = jsRuntime; JsRuntime = jsRuntime;
} }

2
framework/src/Volo.Abp.AspNetCore.MultiTenancy/Volo.Abp.AspNetCore.MultiTenancy.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<AssemblyName>Volo.Abp.AspNetCore.MultiTenancy</AssemblyName> <AssemblyName>Volo.Abp.AspNetCore.MultiTenancy</AssemblyName>
<PackageId>Volo.Abp.AspNetCore.MultiTenancy</PackageId> <PackageId>Volo.Abp.AspNetCore.MultiTenancy</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>

2
framework/src/Volo.Abp.AspNetCore.Mvc.Client/Volo.Abp.AspNetCore.Mvc.Client.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<AssemblyName>Volo.Abp.AspNetCore.Mvc.Client</AssemblyName> <AssemblyName>Volo.Abp.AspNetCore.Mvc.Client</AssemblyName>
<PackageId>Volo.Abp.AspNetCore.Mvc.Client</PackageId> <PackageId>Volo.Abp.AspNetCore.Mvc.Client</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap/Volo.Abp.AspNetCore.Mvc.UI.Bootstrap.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc> <AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<AssemblyName>Volo.Abp.AspNetCore.Mvc.UI.Bootstrap</AssemblyName> <AssemblyName>Volo.Abp.AspNetCore.Mvc.UI.Bootstrap</AssemblyName>
<PackageId>Volo.Abp.AspNetCore.Mvc.UI.Bootstrap</PackageId> <PackageId>Volo.Abp.AspNetCore.Mvc.UI.Bootstrap</PackageId>
@ -12,7 +12,7 @@
<IsPackable>true</IsPackable> <IsPackable>true</IsPackable>
<OutputType>Library</OutputType> <OutputType>Library</OutputType>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\Volo.Abp.AspNetCore.Mvc.UI\Volo.Abp.AspNetCore.Mvc.UI.csproj" /> <ProjectReference Include="..\Volo.Abp.AspNetCore.Mvc.UI\Volo.Abp.AspNetCore.Mvc.UI.csproj" />
</ItemGroup> </ItemGroup>

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Bundling/Volo.Abp.AspNetCore.Mvc.UI.Bundling.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc> <AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<AssemblyName>Volo.Abp.AspNetCore.Mvc.UI.Bundling</AssemblyName> <AssemblyName>Volo.Abp.AspNetCore.Mvc.UI.Bundling</AssemblyName>
<PackageId>Volo.Abp.AspNetCore.Mvc.UI.Bundling</PackageId> <PackageId>Volo.Abp.AspNetCore.Mvc.UI.Bundling</PackageId>

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy/Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc> <AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<AssemblyName>Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy</AssemblyName> <AssemblyName>Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy</AssemblyName>
<PackageId>Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy</PackageId> <PackageId>Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy</PackageId>

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Packages/Volo.Abp.AspNetCore.Mvc.UI.Packages.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc> <AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<AssemblyName>Volo.Abp.AspNetCore.Mvc.UI.Packages</AssemblyName> <AssemblyName>Volo.Abp.AspNetCore.Mvc.UI.Packages</AssemblyName>
<PackageId>Volo.Abp.AspNetCore.Mvc.UI.Packages</PackageId> <PackageId>Volo.Abp.AspNetCore.Mvc.UI.Packages</PackageId>

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic/Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc> <AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<AssemblyName>Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic</AssemblyName> <AssemblyName>Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic</AssemblyName>
<PackageId>Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic</PackageId> <PackageId>Volo.Abp.AspNetCore.Mvc.UI.Theme.Basic</PackageId>

4
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc> <AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<AssemblyName>Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo</AssemblyName> <AssemblyName>Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo</AssemblyName>
<PackageId>Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo</PackageId> <PackageId>Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Demo</PackageId>
@ -26,7 +26,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="3.1.8" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.0-rc.2.*" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared/Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc> <AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<AssemblyName>Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared</AssemblyName> <AssemblyName>Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared</AssemblyName>
<PackageId>Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared</PackageId> <PackageId>Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared</PackageId>

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI.Widgets/Volo.Abp.AspNetCore.Mvc.UI.Widgets.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc> <AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<AssemblyName>Volo.Abp.AspNetCore.Mvc.UI.Widgets</AssemblyName> <AssemblyName>Volo.Abp.AspNetCore.Mvc.UI.Widgets</AssemblyName>
<PackageId>Volo.Abp.AspNetCore.Mvc.UI.Widgets</PackageId> <PackageId>Volo.Abp.AspNetCore.Mvc.UI.Widgets</PackageId>

2
framework/src/Volo.Abp.AspNetCore.Mvc.UI/Volo.Abp.AspNetCore.Mvc.UI.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc> <AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<AssemblyName>Volo.Abp.AspNetCore.Mvc.UI</AssemblyName> <AssemblyName>Volo.Abp.AspNetCore.Mvc.UI</AssemblyName>
<PackageId>Volo.Abp.AspNetCore.Mvc.UI</PackageId> <PackageId>Volo.Abp.AspNetCore.Mvc.UI</PackageId>

6
framework/src/Volo.Abp.AspNetCore.Mvc/Volo.Abp.AspNetCore.Mvc.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<AddRazorSupportForMvc>true</AddRazorSupportForMvc> <AddRazorSupportForMvc>true</AddRazorSupportForMvc>
<AssemblyName>Volo.Abp.AspNetCore.Mvc</AssemblyName> <AssemblyName>Volo.Abp.AspNetCore.Mvc</AssemblyName>
<PackageId>Volo.Abp.AspNetCore.Mvc</PackageId> <PackageId>Volo.Abp.AspNetCore.Mvc</PackageId>
@ -27,9 +27,9 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="3.1.8" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="5.0.0-rc.2.*" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="4.1.1" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.Versioning" Version="4.1.1" />
<PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="3.1.8" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="5.0.0-rc.2.*" />
</ItemGroup> </ItemGroup>
</Project> </Project>

3
framework/src/Volo.Abp.AspNetCore.Mvc/Volo/Abp/AspNetCore/Mvc/ModelBinding/AbpDateTimeModelBinderProvider.cs

@ -6,6 +6,7 @@ using Volo.Abp.Timing;
namespace Volo.Abp.AspNetCore.Mvc.ModelBinding namespace Volo.Abp.AspNetCore.Mvc.ModelBinding
{ {
public class AbpDateTimeModelBinderProvider : IModelBinderProvider public class AbpDateTimeModelBinderProvider : IModelBinderProvider
{ {
public IModelBinder GetBinder(ModelBinderProviderContext context) public IModelBinder GetBinder(ModelBinderProviderContext context)
@ -44,4 +45,4 @@ namespace Volo.Abp.AspNetCore.Mvc.ModelBinding
return null; return null;
} }
} }
} }

2
framework/src/Volo.Abp.AspNetCore.Serilog/Volo.Abp.AspNetCore.Serilog.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<AssemblyName>Volo.Abp.AspNetCore.Serilog</AssemblyName> <AssemblyName>Volo.Abp.AspNetCore.Serilog</AssemblyName>
<PackageId>Volo.Abp.AspNetCore.Serilog</PackageId> <PackageId>Volo.Abp.AspNetCore.Serilog</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>

2
framework/src/Volo.Abp.AspNetCore.SignalR/Volo.Abp.AspNetCore.SignalR.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<AssemblyName>Volo.Abp.AspNetCore.SignalR</AssemblyName> <AssemblyName>Volo.Abp.AspNetCore.SignalR</AssemblyName>
<PackageId>Volo.Abp.AspNetCore.SignalR</PackageId> <PackageId>Volo.Abp.AspNetCore.SignalR</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>

4
framework/src/Volo.Abp.AspNetCore.TestBase/Volo.Abp.AspNetCore.TestBase.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<AssemblyName>Volo.Abp.AspNetCore.TestBase</AssemblyName> <AssemblyName>Volo.Abp.AspNetCore.TestBase</AssemblyName>
<PackageId>Volo.Abp.AspNetCore.TestBase</PackageId> <PackageId>Volo.Abp.AspNetCore.TestBase</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
@ -24,7 +24,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="3.1.8" /> <PackageReference Include="Microsoft.AspNetCore.TestHost" Version="5.0.0-rc.2.*" />
</ItemGroup> </ItemGroup>
</Project> </Project>

2
framework/src/Volo.Abp.AspNetCore/Volo.Abp.AspNetCore.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<AssemblyName>Volo.Abp.AspNetCore</AssemblyName> <AssemblyName>Volo.Abp.AspNetCore</AssemblyName>
<PackageId>Volo.Abp.AspNetCore</PackageId> <PackageId>Volo.Abp.AspNetCore</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>

758
framework/src/Volo.Abp.AspNetCore/Volo/Abp/AspNetCore/VirtualFileSystem/AbpAspNetCoreContentOptions.cs

@ -16,384 +16,386 @@ namespace Volo.Abp.AspNetCore.VirtualFileSystem
{ {
ContentTypeMaps = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase) ContentTypeMaps = new Dictionary<string, string>(StringComparer.OrdinalIgnoreCase)
{ {
{".323", "text/h323"}, { ".323", "text/h323" },
{".3g2", "video/3gpp2"}, { ".3g2", "video/3gpp2" },
{".3gp2", "video/3gpp2"}, { ".3gp2", "video/3gpp2" },
{".3gp", "video/3gpp"}, { ".3gp", "video/3gpp" },
{".3gpp", "video/3gpp"}, { ".3gpp", "video/3gpp" },
{".aac", "audio/aac"}, { ".aac", "audio/aac" },
{".aaf", "application/octet-stream"}, { ".aaf", "application/octet-stream" },
{".aca", "application/octet-stream"}, { ".aca", "application/octet-stream" },
{".accdb", "application/msaccess"}, { ".accdb", "application/msaccess" },
{".accde", "application/msaccess"}, { ".accde", "application/msaccess" },
{".accdt", "application/msaccess"}, { ".accdt", "application/msaccess" },
{".acx", "application/internet-property-stream"}, { ".acx", "application/internet-property-stream" },
{".adt", "audio/vnd.dlna.adts"}, { ".adt", "audio/vnd.dlna.adts" },
{".adts", "audio/vnd.dlna.adts"}, { ".adts", "audio/vnd.dlna.adts" },
{".afm", "application/octet-stream"}, { ".afm", "application/octet-stream" },
{".ai", "application/postscript"}, { ".ai", "application/postscript" },
{".aif", "audio/x-aiff"}, { ".aif", "audio/x-aiff" },
{".aifc", "audio/aiff"}, { ".aifc", "audio/aiff" },
{".aiff", "audio/aiff"}, { ".aiff", "audio/aiff" },
{".appcache", "text/cache-manifest"}, { ".appcache", "text/cache-manifest" },
{".application", "application/x-ms-application"}, { ".application", "application/x-ms-application" },
{".art", "image/x-jg"}, { ".art", "image/x-jg" },
{".asd", "application/octet-stream"}, { ".asd", "application/octet-stream" },
{".asf", "video/x-ms-asf"}, { ".asf", "video/x-ms-asf" },
{".asi", "application/octet-stream"}, { ".asi", "application/octet-stream" },
{".asm", "text/plain"}, { ".asm", "text/plain" },
{".asr", "video/x-ms-asf"}, { ".asr", "video/x-ms-asf" },
{".asx", "video/x-ms-asf"}, { ".asx", "video/x-ms-asf" },
{".atom", "application/atom+xml"}, { ".atom", "application/atom+xml" },
{".au", "audio/basic"}, { ".au", "audio/basic" },
{".avi", "video/x-msvideo"}, { ".avi", "video/x-msvideo" },
{".axs", "application/olescript"}, { ".axs", "application/olescript" },
{".bas", "text/plain"}, { ".bas", "text/plain" },
{".bcpio", "application/x-bcpio"}, { ".bcpio", "application/x-bcpio" },
{".bin", "application/octet-stream"}, { ".bin", "application/octet-stream" },
{".bmp", "image/bmp"}, { ".bmp", "image/bmp" },
{".c", "text/plain"}, { ".c", "text/plain" },
{".cab", "application/vnd.ms-cab-compressed"}, { ".cab", "application/vnd.ms-cab-compressed" },
{".calx", "application/vnd.ms-office.calx"}, { ".calx", "application/vnd.ms-office.calx" },
{".cat", "application/vnd.ms-pki.seccat"}, { ".cat", "application/vnd.ms-pki.seccat" },
{".cdf", "application/x-cdf"}, { ".cdf", "application/x-cdf" },
{".chm", "application/octet-stream"}, { ".chm", "application/octet-stream" },
{".class", "application/x-java-applet"}, { ".class", "application/x-java-applet" },
{".clp", "application/x-msclip"}, { ".clp", "application/x-msclip" },
{".cmx", "image/x-cmx"}, { ".cmx", "image/x-cmx" },
{".cnf", "text/plain"}, { ".cnf", "text/plain" },
{".cod", "image/cis-cod"}, { ".cod", "image/cis-cod" },
{".cpio", "application/x-cpio"}, { ".cpio", "application/x-cpio" },
{".cpp", "text/plain"}, { ".cpp", "text/plain" },
{".crd", "application/x-mscardfile"}, { ".crd", "application/x-mscardfile" },
{".crl", "application/pkix-crl"}, { ".crl", "application/pkix-crl" },
{".crt", "application/x-x509-ca-cert"}, { ".crt", "application/x-x509-ca-cert" },
{".csh", "application/x-csh"}, { ".csh", "application/x-csh" },
{".css", "text/css"}, { ".css", "text/css" },
{".csv", "application/octet-stream"}, { ".csv", "text/csv" }, // https://tools.ietf.org/html/rfc7111#section-5.1
{".cur", "application/octet-stream"}, { ".cur", "application/octet-stream" },
{".dcr", "application/x-director"}, { ".dcr", "application/x-director" },
{".deploy", "application/octet-stream"}, { ".deploy", "application/octet-stream" },
{".der", "application/x-x509-ca-cert"}, { ".der", "application/x-x509-ca-cert" },
{".dib", "image/bmp"}, { ".dib", "image/bmp" },
{".dir", "application/x-director"}, { ".dir", "application/x-director" },
{".disco", "text/xml"}, { ".disco", "text/xml" },
{".dlm", "text/dlm"}, { ".dlm", "text/dlm" },
{".doc", "application/msword"}, { ".doc", "application/msword" },
{".docm", "application/vnd.ms-word.document.macroEnabled.12"}, { ".docm", "application/vnd.ms-word.document.macroEnabled.12" },
{".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document"}, { ".docx", "application/vnd.openxmlformats-officedocument.wordprocessingml.document" },
{".dot", "application/msword"}, { ".dot", "application/msword" },
{".dotm", "application/vnd.ms-word.template.macroEnabled.12"}, { ".dotm", "application/vnd.ms-word.template.macroEnabled.12" },
{".dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template"}, { ".dotx", "application/vnd.openxmlformats-officedocument.wordprocessingml.template" },
{".dsp", "application/octet-stream"}, { ".dsp", "application/octet-stream" },
{".dtd", "text/xml"}, { ".dtd", "text/xml" },
{".dvi", "application/x-dvi"}, { ".dvi", "application/x-dvi" },
{".dvr-ms", "video/x-ms-dvr"}, { ".dvr-ms", "video/x-ms-dvr" },
{".dwf", "drawing/x-dwf"}, { ".dwf", "drawing/x-dwf" },
{".dwp", "application/octet-stream"}, { ".dwp", "application/octet-stream" },
{".dxr", "application/x-director"}, { ".dxr", "application/x-director" },
{".eml", "message/rfc822"}, { ".eml", "message/rfc822" },
{".emz", "application/octet-stream"}, { ".emz", "application/octet-stream" },
{".eot", "application/vnd.ms-fontobject"}, { ".eot", "application/vnd.ms-fontobject" },
{".eps", "application/postscript"}, { ".eps", "application/postscript" },
{".etx", "text/x-setext"}, { ".etx", "text/x-setext" },
{".evy", "application/envoy"}, { ".evy", "application/envoy" },
{".fdf", "application/vnd.fdf"}, { ".exe", "application/vnd.microsoft.portable-executable" }, // https://www.iana.org/assignments/media-types/application/vnd.microsoft.portable-executable
{".fif", "application/fractals"}, { ".fdf", "application/vnd.fdf" },
{".fla", "application/octet-stream"}, { ".fif", "application/fractals" },
{".flr", "x-world/x-vrml"}, { ".fla", "application/octet-stream" },
{".flv", "video/x-flv"}, { ".flr", "x-world/x-vrml" },
{".gif", "image/gif"}, { ".flv", "video/x-flv" },
{".gtar", "application/x-gtar"}, { ".gif", "image/gif" },
{".gz", "application/x-gzip"}, { ".gtar", "application/x-gtar" },
{".h", "text/plain"}, { ".gz", "application/x-gzip" },
{".hdf", "application/x-hdf"}, { ".h", "text/plain" },
{".hdml", "text/x-hdml"}, { ".hdf", "application/x-hdf" },
{".hhc", "application/x-oleobject"}, { ".hdml", "text/x-hdml" },
{".hhk", "application/octet-stream"}, { ".hhc", "application/x-oleobject" },
{".hhp", "application/octet-stream"}, { ".hhk", "application/octet-stream" },
{".hlp", "application/winhlp"}, { ".hhp", "application/octet-stream" },
{".hqx", "application/mac-binhex40"}, { ".hlp", "application/winhlp" },
{".hta", "application/hta"}, { ".hqx", "application/mac-binhex40" },
{".htc", "text/x-component"}, { ".hta", "application/hta" },
{".htm", "text/html"}, { ".htc", "text/x-component" },
{".html", "text/html"}, { ".htm", "text/html" },
{".htt", "text/webviewhtml"}, { ".html", "text/html" },
{".hxt", "text/html"}, { ".htt", "text/webviewhtml" },
{".ical", "text/calendar"}, { ".hxt", "text/html" },
{".icalendar", "text/calendar"}, { ".ical", "text/calendar" },
{".ico", "image/x-icon"}, { ".icalendar", "text/calendar" },
{".ics", "text/calendar"}, { ".ico", "image/x-icon" },
{".ief", "image/ief"}, { ".ics", "text/calendar" },
{".ifb", "text/calendar"}, { ".ief", "image/ief" },
{".iii", "application/x-iphone"}, { ".ifb", "text/calendar" },
{".inf", "application/octet-stream"}, { ".iii", "application/x-iphone" },
{".ins", "application/x-internet-signup"}, { ".inf", "application/octet-stream" },
{".isp", "application/x-internet-signup"}, { ".ins", "application/x-internet-signup" },
{".IVF", "video/x-ivf"}, { ".isp", "application/x-internet-signup" },
{".jar", "application/java-archive"}, { ".IVF", "video/x-ivf" },
{".java", "application/octet-stream"}, { ".jar", "application/java-archive" },
{".jck", "application/liquidmotion"}, { ".java", "application/octet-stream" },
{".jcz", "application/liquidmotion"}, { ".jck", "application/liquidmotion" },
{".jfif", "image/pjpeg"}, { ".jcz", "application/liquidmotion" },
{".jpb", "application/octet-stream"}, { ".jfif", "image/pjpeg" },
{".jpe", "image/jpeg"}, { ".jpb", "application/octet-stream" },
{".jpeg", "image/jpeg"}, { ".jpe", "image/jpeg" },
{".jpg", "image/jpeg"}, { ".jpeg", "image/jpeg" },
{".js", "application/javascript"}, { ".jpg", "image/jpeg" },
{".json", "application/json"}, { ".js", "application/javascript" },
{".jsx", "text/jscript"}, { ".json", "application/json" },
{".latex", "application/x-latex"}, { ".jsx", "text/jscript" },
{".lit", "application/x-ms-reader"}, { ".latex", "application/x-latex" },
{".lpk", "application/octet-stream"}, { ".lit", "application/x-ms-reader" },
{".lsf", "video/x-la-asf"}, { ".lpk", "application/octet-stream" },
{".lsx", "video/x-la-asf"}, { ".lsf", "video/x-la-asf" },
{".lzh", "application/octet-stream"}, { ".lsx", "video/x-la-asf" },
{".m13", "application/x-msmediaview"}, { ".lzh", "application/octet-stream" },
{".m14", "application/x-msmediaview"}, { ".m13", "application/x-msmediaview" },
{".m1v", "video/mpeg"}, { ".m14", "application/x-msmediaview" },
{".m2ts", "video/vnd.dlna.mpeg-tts"}, { ".m1v", "video/mpeg" },
{".m3u", "audio/x-mpegurl"}, { ".m2ts", "video/vnd.dlna.mpeg-tts" },
{".m4a", "audio/mp4"}, { ".m3u", "audio/x-mpegurl" },
{".m4v", "video/mp4"}, { ".m4a", "audio/mp4" },
{".man", "application/x-troff-man"}, { ".m4v", "video/mp4" },
{".manifest", "application/x-ms-manifest"}, { ".man", "application/x-troff-man" },
{".map", "text/plain"}, { ".manifest", "application/x-ms-manifest" },
{".markdown", "text/markdown"}, { ".map", "text/plain" },
{".md", "text/markdown"}, { ".markdown", "text/markdown" },
{".mdb", "application/x-msaccess"}, { ".md", "text/markdown" },
{".mdp", "application/octet-stream"}, { ".mdb", "application/x-msaccess" },
{".me", "application/x-troff-me"}, { ".mdp", "application/octet-stream" },
{".mht", "message/rfc822"}, { ".me", "application/x-troff-me" },
{".mhtml", "message/rfc822"}, { ".mht", "message/rfc822" },
{".mid", "audio/mid"}, { ".mhtml", "message/rfc822" },
{".midi", "audio/mid"}, { ".mid", "audio/mid" },
{".mix", "application/octet-stream"}, { ".midi", "audio/mid" },
{".mmf", "application/x-smaf"}, { ".mix", "application/octet-stream" },
{".mno", "text/xml"}, { ".mmf", "application/x-smaf" },
{".mny", "application/x-msmoney"}, { ".mno", "text/xml" },
{".mov", "video/quicktime"}, { ".mny", "application/x-msmoney" },
{".movie", "video/x-sgi-movie"}, { ".mov", "video/quicktime" },
{".mp2", "video/mpeg"}, { ".movie", "video/x-sgi-movie" },
{".mp3", "audio/mpeg"}, { ".mp2", "video/mpeg" },
{".mp4", "video/mp4"}, { ".mp3", "audio/mpeg" },
{".mp4v", "video/mp4"}, { ".mp4", "video/mp4" },
{".mpa", "video/mpeg"}, { ".mp4v", "video/mp4" },
{".mpe", "video/mpeg"}, { ".mpa", "video/mpeg" },
{".mpeg", "video/mpeg"}, { ".mpe", "video/mpeg" },
{".mpg", "video/mpeg"}, { ".mpeg", "video/mpeg" },
{".mpp", "application/vnd.ms-project"}, { ".mpg", "video/mpeg" },
{".mpv2", "video/mpeg"}, { ".mpp", "application/vnd.ms-project" },
{".ms", "application/x-troff-ms"}, { ".mpv2", "video/mpeg" },
{".msi", "application/octet-stream"}, { ".ms", "application/x-troff-ms" },
{".mso", "application/octet-stream"}, { ".msi", "application/octet-stream" },
{".mvb", "application/x-msmediaview"}, { ".mso", "application/octet-stream" },
{".mvc", "application/x-miva-compiled"}, { ".mvb", "application/x-msmediaview" },
{".nc", "application/x-netcdf"}, { ".mvc", "application/x-miva-compiled" },
{".nsc", "video/x-ms-asf"}, { ".nc", "application/x-netcdf" },
{".nws", "message/rfc822"}, { ".nsc", "video/x-ms-asf" },
{".ocx", "application/octet-stream"}, { ".nws", "message/rfc822" },
{".oda", "application/oda"}, { ".ocx", "application/octet-stream" },
{".odc", "text/x-ms-odc"}, { ".oda", "application/oda" },
{".ods", "application/oleobject"}, { ".odc", "text/x-ms-odc" },
{".oga", "audio/ogg"}, { ".ods", "application/oleobject" },
{".ogg", "video/ogg"}, { ".oga", "audio/ogg" },
{".ogv", "video/ogg"}, { ".ogg", "video/ogg" },
{".ogx", "application/ogg"}, { ".ogv", "video/ogg" },
{".one", "application/onenote"}, { ".ogx", "application/ogg" },
{".onea", "application/onenote"}, { ".one", "application/onenote" },
{".onetoc", "application/onenote"}, { ".onea", "application/onenote" },
{".onetoc2", "application/onenote"}, { ".onetoc", "application/onenote" },
{".onetmp", "application/onenote"}, { ".onetoc2", "application/onenote" },
{".onepkg", "application/onenote"}, { ".onetmp", "application/onenote" },
{".osdx", "application/opensearchdescription+xml"}, { ".onepkg", "application/onenote" },
{".otf", "font/otf"}, { ".osdx", "application/opensearchdescription+xml" },
{".p10", "application/pkcs10"}, { ".otf", "font/otf" },
{".p12", "application/x-pkcs12"}, { ".p10", "application/pkcs10" },
{".p7b", "application/x-pkcs7-certificates"}, { ".p12", "application/x-pkcs12" },
{".p7c", "application/pkcs7-mime"}, { ".p7b", "application/x-pkcs7-certificates" },
{".p7m", "application/pkcs7-mime"}, { ".p7c", "application/pkcs7-mime" },
{".p7r", "application/x-pkcs7-certreqresp"}, { ".p7m", "application/pkcs7-mime" },
{".p7s", "application/pkcs7-signature"}, { ".p7r", "application/x-pkcs7-certreqresp" },
{".pbm", "image/x-portable-bitmap"}, { ".p7s", "application/pkcs7-signature" },
{".pcx", "application/octet-stream"}, { ".pbm", "image/x-portable-bitmap" },
{".pcz", "application/octet-stream"}, { ".pcx", "application/octet-stream" },
{".pdf", "application/pdf"}, { ".pcz", "application/octet-stream" },
{".pfb", "application/octet-stream"}, { ".pdf", "application/pdf" },
{".pfm", "application/octet-stream"}, { ".pfb", "application/octet-stream" },
{".pfx", "application/x-pkcs12"}, { ".pfm", "application/octet-stream" },
{".pgm", "image/x-portable-graymap"}, { ".pfx", "application/x-pkcs12" },
{".pko", "application/vnd.ms-pki.pko"}, { ".pgm", "image/x-portable-graymap" },
{".pma", "application/x-perfmon"}, { ".pko", "application/vnd.ms-pki.pko" },
{".pmc", "application/x-perfmon"}, { ".pma", "application/x-perfmon" },
{".pml", "application/x-perfmon"}, { ".pmc", "application/x-perfmon" },
{".pmr", "application/x-perfmon"}, { ".pml", "application/x-perfmon" },
{".pmw", "application/x-perfmon"}, { ".pmr", "application/x-perfmon" },
{".png", "image/png"}, { ".pmw", "application/x-perfmon" },
{".pnm", "image/x-portable-anymap"}, { ".png", "image/png" },
{".pnz", "image/png"}, { ".pnm", "image/x-portable-anymap" },
{".pot", "application/vnd.ms-powerpoint"}, { ".pnz", "image/png" },
{".potm", "application/vnd.ms-powerpoint.template.macroEnabled.12"}, { ".pot", "application/vnd.ms-powerpoint" },
{".potx", "application/vnd.openxmlformats-officedocument.presentationml.template"}, { ".potm", "application/vnd.ms-powerpoint.template.macroEnabled.12" },
{".ppam", "application/vnd.ms-powerpoint.addin.macroEnabled.12"}, { ".potx", "application/vnd.openxmlformats-officedocument.presentationml.template" },
{".ppm", "image/x-portable-pixmap"}, { ".ppam", "application/vnd.ms-powerpoint.addin.macroEnabled.12" },
{".pps", "application/vnd.ms-powerpoint"}, { ".ppm", "image/x-portable-pixmap" },
{".ppsm", "application/vnd.ms-powerpoint.slideshow.macroEnabled.12"}, { ".pps", "application/vnd.ms-powerpoint" },
{".ppsx", "application/vnd.openxmlformats-officedocument.presentationml.slideshow"}, { ".ppsm", "application/vnd.ms-powerpoint.slideshow.macroEnabled.12" },
{".ppt", "application/vnd.ms-powerpoint"}, { ".ppsx", "application/vnd.openxmlformats-officedocument.presentationml.slideshow" },
{".pptm", "application/vnd.ms-powerpoint.presentation.macroEnabled.12"}, { ".ppt", "application/vnd.ms-powerpoint" },
{".pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation"}, { ".pptm", "application/vnd.ms-powerpoint.presentation.macroEnabled.12" },
{".prf", "application/pics-rules"}, { ".pptx", "application/vnd.openxmlformats-officedocument.presentationml.presentation" },
{".prm", "application/octet-stream"}, { ".prf", "application/pics-rules" },
{".prx", "application/octet-stream"}, { ".prm", "application/octet-stream" },
{".ps", "application/postscript"}, { ".prx", "application/octet-stream" },
{".psd", "application/octet-stream"}, { ".ps", "application/postscript" },
{".psm", "application/octet-stream"}, { ".psd", "application/octet-stream" },
{".psp", "application/octet-stream"}, { ".psm", "application/octet-stream" },
{".pub", "application/x-mspublisher"}, { ".psp", "application/octet-stream" },
{".qt", "video/quicktime"}, { ".pub", "application/x-mspublisher" },
{".qtl", "application/x-quicktimeplayer"}, { ".qt", "video/quicktime" },
{".qxd", "application/octet-stream"}, { ".qtl", "application/x-quicktimeplayer" },
{".ra", "audio/x-pn-realaudio"}, { ".qxd", "application/octet-stream" },
{".ram", "audio/x-pn-realaudio"}, { ".ra", "audio/x-pn-realaudio" },
{".rar", "application/octet-stream"}, { ".ram", "audio/x-pn-realaudio" },
{".ras", "image/x-cmu-raster"}, { ".rar", "application/octet-stream" },
{".rf", "image/vnd.rn-realflash"}, { ".ras", "image/x-cmu-raster" },
{".rgb", "image/x-rgb"}, { ".rf", "image/vnd.rn-realflash" },
{".rm", "application/vnd.rn-realmedia"}, { ".rgb", "image/x-rgb" },
{".rmi", "audio/mid"}, { ".rm", "application/vnd.rn-realmedia" },
{".roff", "application/x-troff"}, { ".rmi", "audio/mid" },
{".rpm", "audio/x-pn-realaudio-plugin"}, { ".roff", "application/x-troff" },
{".rtf", "application/rtf"}, { ".rpm", "audio/x-pn-realaudio-plugin" },
{".rtx", "text/richtext"}, { ".rtf", "application/rtf" },
{".scd", "application/x-msschedule"}, { ".rtx", "text/richtext" },
{".sct", "text/scriptlet"}, { ".scd", "application/x-msschedule" },
{".sea", "application/octet-stream"}, { ".sct", "text/scriptlet" },
{".setpay", "application/set-payment-initiation"}, { ".sea", "application/octet-stream" },
{".setreg", "application/set-registration-initiation"}, { ".setpay", "application/set-payment-initiation" },
{".sgml", "text/sgml"}, { ".setreg", "application/set-registration-initiation" },
{".sh", "application/x-sh"}, { ".sgml", "text/sgml" },
{".shar", "application/x-shar"}, { ".sh", "application/x-sh" },
{".sit", "application/x-stuffit"}, { ".shar", "application/x-shar" },
{".sldm", "application/vnd.ms-powerpoint.slide.macroEnabled.12"}, { ".sit", "application/x-stuffit" },
{".sldx", "application/vnd.openxmlformats-officedocument.presentationml.slide"}, { ".sldm", "application/vnd.ms-powerpoint.slide.macroEnabled.12" },
{".smd", "audio/x-smd"}, { ".sldx", "application/vnd.openxmlformats-officedocument.presentationml.slide" },
{".smi", "application/octet-stream"}, { ".smd", "audio/x-smd" },
{".smx", "audio/x-smd"}, { ".smi", "application/octet-stream" },
{".smz", "audio/x-smd"}, { ".smx", "audio/x-smd" },
{".snd", "audio/basic"}, { ".smz", "audio/x-smd" },
{".snp", "application/octet-stream"}, { ".snd", "audio/basic" },
{".spc", "application/x-pkcs7-certificates"}, { ".snp", "application/octet-stream" },
{".spl", "application/futuresplash"}, { ".spc", "application/x-pkcs7-certificates" },
{".spx", "audio/ogg"}, { ".spl", "application/futuresplash" },
{".src", "application/x-wais-source"}, { ".spx", "audio/ogg" },
{".ssm", "application/streamingmedia"}, { ".src", "application/x-wais-source" },
{".sst", "application/vnd.ms-pki.certstore"}, { ".ssm", "application/streamingmedia" },
{".stl", "application/vnd.ms-pki.stl"}, { ".sst", "application/vnd.ms-pki.certstore" },
{".sv4cpio", "application/x-sv4cpio"}, { ".stl", "application/vnd.ms-pki.stl" },
{".sv4crc", "application/x-sv4crc"}, { ".sv4cpio", "application/x-sv4cpio" },
{".svg", "image/svg+xml"}, { ".sv4crc", "application/x-sv4crc" },
{".svgz", "image/svg+xml"}, { ".svg", "image/svg+xml" },
{".swf", "application/x-shockwave-flash"}, { ".svgz", "image/svg+xml" },
{".t", "application/x-troff"}, { ".swf", "application/x-shockwave-flash" },
{".tar", "application/x-tar"}, { ".t", "application/x-troff" },
{".tcl", "application/x-tcl"}, { ".tar", "application/x-tar" },
{".tex", "application/x-tex"}, { ".tcl", "application/x-tcl" },
{".texi", "application/x-texinfo"}, { ".tex", "application/x-tex" },
{".texinfo", "application/x-texinfo"}, { ".texi", "application/x-texinfo" },
{".tgz", "application/x-compressed"}, { ".texinfo", "application/x-texinfo" },
{".thmx", "application/vnd.ms-officetheme"}, { ".tgz", "application/x-compressed" },
{".thn", "application/octet-stream"}, { ".thmx", "application/vnd.ms-officetheme" },
{".tif", "image/tiff"}, { ".thn", "application/octet-stream" },
{".tiff", "image/tiff"}, { ".tif", "image/tiff" },
{".toc", "application/octet-stream"}, { ".tiff", "image/tiff" },
{".tr", "application/x-troff"}, { ".toc", "application/octet-stream" },
{".trm", "application/x-msterminal"}, { ".tr", "application/x-troff" },
{".ts", "video/vnd.dlna.mpeg-tts"}, { ".trm", "application/x-msterminal" },
{".tsv", "text/tab-separated-values"}, { ".ts", "video/vnd.dlna.mpeg-tts" },
{".ttc", "application/x-font-ttf"}, { ".tsv", "text/tab-separated-values" },
{".ttf", "application/x-font-ttf"}, { ".ttc", "application/x-font-ttf" },
{".tts", "video/vnd.dlna.mpeg-tts"}, { ".ttf", "application/x-font-ttf" },
{".txt", "text/plain"}, { ".tts", "video/vnd.dlna.mpeg-tts" },
{".u32", "application/octet-stream"}, { ".txt", "text/plain" },
{".uls", "text/iuls"}, { ".u32", "application/octet-stream" },
{".ustar", "application/x-ustar"}, { ".uls", "text/iuls" },
{".vbs", "text/vbscript"}, { ".ustar", "application/x-ustar" },
{".vcf", "text/x-vcard"}, { ".vbs", "text/vbscript" },
{".vcs", "text/plain"}, { ".vcf", "text/x-vcard" },
{".vdx", "application/vnd.ms-visio.viewer"}, { ".vcs", "text/plain" },
{".vml", "text/xml"}, { ".vdx", "application/vnd.ms-visio.viewer" },
{".vsd", "application/vnd.visio"}, { ".vml", "text/xml" },
{".vss", "application/vnd.visio"}, { ".vsd", "application/vnd.visio" },
{".vst", "application/vnd.visio"}, { ".vss", "application/vnd.visio" },
{".vsto", "application/x-ms-vsto"}, { ".vst", "application/vnd.visio" },
{".vsw", "application/vnd.visio"}, { ".vsto", "application/x-ms-vsto" },
{".vsx", "application/vnd.visio"}, { ".vsw", "application/vnd.visio" },
{".vtx", "application/vnd.visio"}, { ".vsx", "application/vnd.visio" },
{".wasm", "application/wasm"}, { ".vtx", "application/vnd.visio" },
{".wav", "audio/wav"}, { ".wasm", "application/wasm" },
{".wax", "audio/x-ms-wax"}, { ".wav", "audio/wav" },
{".wbmp", "image/vnd.wap.wbmp"}, { ".wax", "audio/x-ms-wax" },
{".wcm", "application/vnd.ms-works"}, { ".wbmp", "image/vnd.wap.wbmp" },
{".wdb", "application/vnd.ms-works"}, { ".wcm", "application/vnd.ms-works" },
{".webm", "video/webm"}, { ".wdb", "application/vnd.ms-works" },
{".webp", "image/webp"}, { ".webm", "video/webm" },
{".wks", "application/vnd.ms-works"}, { ".webmanifest", "application/manifest+json" }, // https://w3c.github.io/manifest/#media-type-registration
{".wm", "video/x-ms-wm"}, { ".webp", "image/webp" },
{".wma", "audio/x-ms-wma"}, { ".wks", "application/vnd.ms-works" },
{".wmd", "application/x-ms-wmd"}, { ".wm", "video/x-ms-wm" },
{".wmf", "application/x-msmetafile"}, { ".wma", "audio/x-ms-wma" },
{".wml", "text/vnd.wap.wml"}, { ".wmd", "application/x-ms-wmd" },
{".wmlc", "application/vnd.wap.wmlc"}, { ".wmf", "application/x-msmetafile" },
{".wmls", "text/vnd.wap.wmlscript"}, { ".wml", "text/vnd.wap.wml" },
{".wmlsc", "application/vnd.wap.wmlscriptc"}, { ".wmlc", "application/vnd.wap.wmlc" },
{".wmp", "video/x-ms-wmp"}, { ".wmls", "text/vnd.wap.wmlscript" },
{".wmv", "video/x-ms-wmv"}, { ".wmlsc", "application/vnd.wap.wmlscriptc" },
{".wmx", "video/x-ms-wmx"}, { ".wmp", "video/x-ms-wmp" },
{".wmz", "application/x-ms-wmz"}, { ".wmv", "video/x-ms-wmv" },
{".woff", "application/font-woff"}, // https://www.w3.org/TR/WOFF/#appendix-b { ".wmx", "video/x-ms-wmx" },
{".woff2", "font/woff2"}, // https://www.w3.org/TR/WOFF2/#IMT { ".wmz", "application/x-ms-wmz" },
{".wps", "application/vnd.ms-works"}, { ".woff", "application/font-woff" }, // https://www.w3.org/TR/WOFF/#appendix-b
{".wri", "application/x-mswrite"}, { ".woff2", "font/woff2" }, // https://www.w3.org/TR/WOFF2/#IMT
{".wrl", "x-world/x-vrml"}, { ".wps", "application/vnd.ms-works" },
{".wrz", "x-world/x-vrml"}, { ".wri", "application/x-mswrite" },
{".wsdl", "text/xml"}, { ".wrl", "x-world/x-vrml" },
{".wtv", "video/x-ms-wtv"}, { ".wrz", "x-world/x-vrml" },
{".wvx", "video/x-ms-wvx"}, { ".wsdl", "text/xml" },
{".x", "application/directx"}, { ".wtv", "video/x-ms-wtv" },
{".xaf", "x-world/x-vrml"}, { ".wvx", "video/x-ms-wvx" },
{".xaml", "application/xaml+xml"}, { ".x", "application/directx" },
{".xap", "application/x-silverlight-app"}, { ".xaf", "x-world/x-vrml" },
{".xbap", "application/x-ms-xbap"}, { ".xaml", "application/xaml+xml" },
{".xbm", "image/x-xbitmap"}, { ".xap", "application/x-silverlight-app" },
{".xdr", "text/plain"}, { ".xbap", "application/x-ms-xbap" },
{".xht", "application/xhtml+xml"}, { ".xbm", "image/x-xbitmap" },
{".xhtml", "application/xhtml+xml"}, { ".xdr", "text/plain" },
{".xla", "application/vnd.ms-excel"}, { ".xht", "application/xhtml+xml" },
{".xlam", "application/vnd.ms-excel.addin.macroEnabled.12"}, { ".xhtml", "application/xhtml+xml" },
{".xlc", "application/vnd.ms-excel"}, { ".xla", "application/vnd.ms-excel" },
{".xlm", "application/vnd.ms-excel"}, { ".xlam", "application/vnd.ms-excel.addin.macroEnabled.12" },
{".xls", "application/vnd.ms-excel"}, { ".xlc", "application/vnd.ms-excel" },
{".xlsb", "application/vnd.ms-excel.sheet.binary.macroEnabled.12"}, { ".xlm", "application/vnd.ms-excel" },
{".xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12"}, { ".xls", "application/vnd.ms-excel" },
{".xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}, { ".xlsb", "application/vnd.ms-excel.sheet.binary.macroEnabled.12" },
{".xlt", "application/vnd.ms-excel"}, { ".xlsm", "application/vnd.ms-excel.sheet.macroEnabled.12" },
{".xltm", "application/vnd.ms-excel.template.macroEnabled.12"}, { ".xlsx", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" },
{".xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template"}, { ".xlt", "application/vnd.ms-excel" },
{".xlw", "application/vnd.ms-excel"}, { ".xltm", "application/vnd.ms-excel.template.macroEnabled.12" },
{".xml", "text/xml"}, { ".xltx", "application/vnd.openxmlformats-officedocument.spreadsheetml.template" },
{".xof", "x-world/x-vrml"}, { ".xlw", "application/vnd.ms-excel" },
{".xpm", "image/x-xpixmap"}, { ".xml", "text/xml" },
{".xps", "application/vnd.ms-xpsdocument"}, { ".xof", "x-world/x-vrml" },
{".xsd", "text/xml"}, { ".xpm", "image/x-xpixmap" },
{".xsf", "text/xml"}, { ".xps", "application/vnd.ms-xpsdocument" },
{".xsl", "text/xml"}, { ".xsd", "text/xml" },
{".xslt", "text/xml"}, { ".xsf", "text/xml" },
{".xsn", "application/octet-stream"}, { ".xsl", "text/xml" },
{".xtp", "application/octet-stream"}, { ".xslt", "text/xml" },
{".xwd", "image/x-xwindowdump"}, { ".xsn", "application/octet-stream" },
{".z", "application/x-compress"}, { ".xtp", "application/octet-stream" },
{".zip", "application/x-zip-compressed"}, { ".xwd", "image/x-xwindowdump" },
{ ".z", "application/x-compress" },
{ ".zip", "application/x-zip-compressed" }
}; };
AllowedExtraWebContentFolders = new List<string> AllowedExtraWebContentFolders = new List<string>

2
framework/src/Volo.Abp.Authorization/Volo.Abp.Authorization.csproj

@ -15,7 +15,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Authorization" Version="3.1.8" /> <PackageReference Include="Microsoft.AspNetCore.Authorization" Version="5.0.0-rc.2.*" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

2
framework/src/Volo.Abp.Autofac.WebAssembly/Volo.Abp.Autofac.WebAssembly.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<RootNamespace /> <RootNamespace />
</PropertyGroup> </PropertyGroup>

2
framework/src/Volo.Abp.Autofac/Volo.Abp.Autofac.csproj

@ -17,7 +17,7 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Autofac.Extras.DynamicProxy" Version="5.0.0" /> <PackageReference Include="Autofac.Extras.DynamicProxy" Version="5.0.0" />
<PackageReference Include="Autofac" Version="5.2.0" /> <PackageReference Include="Autofac" Version="5.2.0" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="3.1.8" /> <PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0-rc.2.*" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

2
framework/src/Volo.Abp.BackgroundJobs.Quartz/Volo.Abp.BackgroundJobs.Quartz.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\configureawait.props" /> <Import Project="..\..\..\configureawait.props" />
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />

2
framework/src/Volo.Abp.BackgroundWorkers.Quartz/Volo.Abp.BackgroundWorkers.Quartz.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\configureawait.props" /> <Import Project="..\..\..\configureawait.props" />
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />

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

@ -4,8 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<RazorLangVersion>3.0</RazorLangVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -13,8 +12,8 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Blazorise" Version="0.9.1.2" /> <PackageReference Include="Blazorise" Version="0.9.2-preview9" />
<PackageReference Include="Blazorise.DataGrid" Version="0.9.1.2" /> <PackageReference Include="Blazorise.DataGrid" Version="0.9.2-preview9" />
</ItemGroup> </ItemGroup>
</Project> </Project>

2
framework/src/Volo.Abp.BlobStoring.Aliyun/Volo.Abp.BlobStoring.Aliyun.csproj

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\configureawait.props" /> <Import Project="..\..\..\configureawait.props" />
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />

2
framework/src/Volo.Abp.BlobStoring.Aws/Volo.Abp.BlobStoring.Aws.csproj

@ -2,7 +2,7 @@
<Import Project="..\..\..\configureawait.props" /> <Import Project="..\..\..\configureawait.props" />
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.0</TargetFramework>
<GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute> <GenerateAssemblyConfigurationAttribute>false</GenerateAssemblyConfigurationAttribute>

4
framework/src/Volo.Abp.BlobStoring.Minio/Volo.Abp.BlobStoring.Minio.csproj

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\configureawait.props" /> <Import Project="..\..\..\configureawait.props" />
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.0</TargetFramework>
<AssemblyName>Volo.Abp.BlobStoring.Minio</AssemblyName> <AssemblyName>Volo.Abp.BlobStoring.Minio</AssemblyName>

2
framework/src/Volo.Abp.Caching.StackExchangeRedis/Volo.Abp.Caching.StackExchangeRedis.csproj

@ -19,7 +19,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="3.1.8" /> <PackageReference Include="Microsoft.Extensions.Caching.StackExchangeRedis" Version="5.0.0-rc.2.*" />
</ItemGroup> </ItemGroup>
</Project> </Project>

2
framework/src/Volo.Abp.Caching/Volo.Abp.Caching.csproj

@ -15,7 +15,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="3.1.8" /> <PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="5.0.0-rc.2.*" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

6
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/App/AppTemplateBase.cs

@ -25,6 +25,7 @@ namespace Volo.Abp.Cli.ProjectBuilding.Templates.App
SwitchDatabaseProvider(context, steps); SwitchDatabaseProvider(context, steps);
DeleteUnrelatedProjects(context, steps); DeleteUnrelatedProjects(context, steps);
RandomizeSslPorts(context, steps); RandomizeSslPorts(context, steps);
RandomizeStringEncryption(context, steps);
UpdateNuGetConfig(context, steps); UpdateNuGetConfig(context, steps);
CleanupFolderHierarchy(context, steps); CleanupFolderHierarchy(context, steps);
@ -185,6 +186,11 @@ namespace Volo.Abp.Cli.ProjectBuilding.Templates.App
); );
} }
private static void RandomizeStringEncryption(ProjectBuildContext context, List<ProjectBuildPipelineStep> steps)
{
steps.Add(new RandomizeStringEncryptionStep());
}
private static void UpdateNuGetConfig(ProjectBuildContext context, List<ProjectBuildPipelineStep> steps) private static void UpdateNuGetConfig(ProjectBuildContext context, List<ProjectBuildPipelineStep> steps)
{ {
steps.Add(new UpdateNuGetConfigStep("/aspnet-core/NuGet.Config")); steps.Add(new UpdateNuGetConfigStep("/aspnet-core/NuGet.Config"));

47
framework/src/Volo.Abp.Cli.Core/Volo/Abp/Cli/ProjectBuilding/Templates/RandomizeStringEncryptionStep.cs

@ -0,0 +1,47 @@
using System;
using System.Linq;
using System.Text;
using Volo.Abp.Cli.ProjectBuilding.Building;
namespace Volo.Abp.Cli.ProjectBuilding.Templates
{
public class RandomizeStringEncryptionStep: ProjectBuildPipelineStep
{
public override void Execute(ProjectBuildContext context)
{
var appSettings = context.Files
.Where(x => !x.IsDirectory && x.Name.EndsWith("appSettings.json", StringComparison.InvariantCultureIgnoreCase))
.Where(x => x.Content.IndexOf("StringEncryption", StringComparison.InvariantCultureIgnoreCase) >= 0)
.ToList();
const string defaultPassPhrase = "gsKnGZ041HLL4IM8";
var randomPassPhrase = GetRandomString(defaultPassPhrase.Length);
foreach (var appSetting in appSettings)
{
appSetting.NormalizeLineEndings();
var appSettingLines = appSetting.GetLines();
for (var i = 0; i < appSettingLines.Length; i++)
{
if (appSettingLines[i].Contains("DefaultPassPhrase") && appSettingLines[i].Contains(defaultPassPhrase))
{
appSettingLines[i] = appSettingLines[i].Replace(defaultPassPhrase, randomPassPhrase);
}
}
appSetting.SetLines(appSettingLines);
}
}
private static string GetRandomString(int length)
{
const string letters = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
var builder = new StringBuilder();
for (var i = 0; i < length; i++)
{
builder.Append(letters[RandomHelper.GetRandom(0, letters.Length)]);
}
return builder.ToString();
}
}
}

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

@ -1,11 +1,11 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\..\configureawait.props" /> <Import Project="..\..\..\configureawait.props" />
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<OutputType>Exe</OutputType> <OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<PackAsTool>true</PackAsTool> <PackAsTool>true</PackAsTool>
<ToolCommandName>abp</ToolCommandName> <ToolCommandName>abp</ToolCommandName>
<RootNamespace /> <RootNamespace />
@ -18,8 +18,8 @@
<PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" /> <PackageReference Include="Serilog.Extensions.Logging" Version="3.0.1" />
<PackageReference Include="Serilog.Sinks.File" Version="4.1.0" /> <PackageReference Include="Serilog.Sinks.File" Version="4.1.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" /> <PackageReference Include="Serilog.Sinks.Console" Version="3.1.1" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="3.1.8" /> <PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="5.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="3.1.8" /> <PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="5.0.0-rc.2.*" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

14
framework/src/Volo.Abp.Core/System/Linq/PredicateOperator.cs

@ -1,5 +1,8 @@
using System.Collections.ObjectModel; using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq.Expressions; using System.Linq.Expressions;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using JetBrains.Annotations; using JetBrains.Annotations;
namespace System.Linq namespace System.Linq
@ -246,15 +249,6 @@ namespace System.Linq
public bool TailCall => Predicate.TailCall; public bool TailCall => Predicate.TailCall;
#endif #endif
#if !(NET35 || WINDOWS_APP || NETSTANDARD || PORTABLE || PORTABLE40 || UAP)
/// <summary></summary>
public void CompileToMethod(MethodBuilder method) { Predicate.CompileToMethod(method); }
/// <summary></summary>
public void CompileToMethod(MethodBuilder method, DebugInfoGenerator debugInfoGenerator) { Predicate.CompileToMethod(method, debugInfoGenerator); }
#endif
#endregion #endregion
#region Implement Expression methods and properties #region Implement Expression methods and properties

18
framework/src/Volo.Abp.Core/Volo.Abp.Core.csproj

@ -16,15 +16,15 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" /> <PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" />
<PackageReference Include="System.Collections.Immutable" Version="1.7.1" /> <PackageReference Include="System.Collections.Immutable" Version="1.7.1" />
<PackageReference Include="Microsoft.Extensions.Localization" Version="3.1.8" /> <PackageReference Include="Microsoft.Extensions.Localization" Version="5.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.8" /> <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="3.1.8" /> <PackageReference Include="Microsoft.Extensions.Configuration.EnvironmentVariables" Version="5.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="3.1.8" /> <PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="5.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="3.1.8" /> <PackageReference Include="Microsoft.Extensions.Configuration.CommandLine" Version="5.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Options" Version="3.1.8" /> <PackageReference Include="Microsoft.Extensions.Options" Version="5.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="3.1.8" /> <PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="5.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="3.1.8" /> <PackageReference Include="Microsoft.Extensions.Logging" Version="5.0.0-rc.2.*" />
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="3.1.8" /> <PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" Version="5.0.0-rc.2.*" />
<PackageReference Include="System.Runtime.Loader" Version="4.3.0" /> <PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
<PackageReference Include="System.Linq.Dynamic.Core" Version="1.1.5" /> <PackageReference Include="System.Linq.Dynamic.Core" Version="1.1.5" />
<PackageReference Include="System.Linq.Queryable" Version="4.3.0" /> <PackageReference Include="System.Linq.Queryable" Version="4.3.0" />

2
framework/src/Volo.Abp.Dapper/Volo.Abp.Dapper.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.1</TargetFramework>
<AssemblyName>Volo.Abp.Dapper</AssemblyName> <AssemblyName>Volo.Abp.Dapper</AssemblyName>
<PackageId>Volo.Abp.Dapper</PackageId> <PackageId>Volo.Abp.Dapper</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>

6
framework/src/Volo.Abp.EntityFrameworkCore.MySQL/Volo.Abp.EntityFrameworkCore.MySQL.csproj

@ -2,9 +2,9 @@
<Import Project="..\..\..\configureawait.props" /> <Import Project="..\..\..\configureawait.props" />
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.1</TargetFramework>
<AssemblyName>Volo.Abp.EntityFrameworkCore.MySQL</AssemblyName> <AssemblyName>Volo.Abp.EntityFrameworkCore.MySQL</AssemblyName>
<PackageId>Volo.Abp.EntityFrameworkCore.MySQL</PackageId> <PackageId>Volo.Abp.EntityFrameworkCore.MySQL</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
@ -21,5 +21,5 @@
<ItemGroup> <ItemGroup>
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.1.1" /> <PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.1.1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

26
framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Microsoft/EntityFrameworkCore/AbpOracleModelBuilderExtensions.cs

@ -1,13 +1,13 @@
using Volo.Abp.EntityFrameworkCore; // using Volo.Abp.EntityFrameworkCore;
//
namespace Microsoft.EntityFrameworkCore // namespace Microsoft.EntityFrameworkCore
{ // {
public static class AbpOracleModelBuilderExtensions // public static class AbpOracleModelBuilderExtensions
{ // {
public static void UseOracle( // public static void UseOracle(
this ModelBuilder modelBuilder) // this ModelBuilder modelBuilder)
{ // {
modelBuilder.SetDatabaseProvider(EfCoreDatabaseProvider.Oracle); // modelBuilder.SetDatabaseProvider(EfCoreDatabaseProvider.Oracle);
} // }
} // }
} // }

2
framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo.Abp.EntityFrameworkCore.Oracle.Devart.csproj

@ -19,7 +19,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Devart.Data.Oracle.EFCore" Version="9.11.1034" /> <!--<PackageReference Include="Devart.Data.Oracle.EFCore" Version="9.11.1034" />-->
</ItemGroup> </ItemGroup>
</Project> </Project>

52
framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleDevartExtensions.cs

@ -1,26 +1,26 @@
using JetBrains.Annotations; // using JetBrains.Annotations;
using Microsoft.EntityFrameworkCore; // using Microsoft.EntityFrameworkCore;
using System; // using System;
using Devart.Data.Oracle.Entity; // using Devart.Data.Oracle.Entity;
using Volo.Abp.EntityFrameworkCore.DependencyInjection; // using Volo.Abp.EntityFrameworkCore.DependencyInjection;
//
namespace Volo.Abp.EntityFrameworkCore // namespace Volo.Abp.EntityFrameworkCore
{ // {
public static class AbpDbContextConfigurationContextOracleDevartExtensions // public static class AbpDbContextConfigurationContextOracleDevartExtensions
{ // {
public static DbContextOptionsBuilder UseOracle( // public static DbContextOptionsBuilder UseOracle(
[NotNull] this AbpDbContextConfigurationContext context, // [NotNull] this AbpDbContextConfigurationContext context,
[CanBeNull] Action<OracleDbContextOptionsBuilder> oracleOptionsAction = null, // [CanBeNull] Action<OracleDbContextOptionsBuilder> oracleOptionsAction = null,
bool useExistingConnectionIfAvailable = false) // bool useExistingConnectionIfAvailable = false)
{ // {
if (useExistingConnectionIfAvailable && context.ExistingConnection != null) // if (useExistingConnectionIfAvailable && context.ExistingConnection != null)
{ // {
return context.DbContextOptions.UseOracle(context.ExistingConnection, oracleOptionsAction); // return context.DbContextOptions.UseOracle(context.ExistingConnection, oracleOptionsAction);
} // }
else // else
{ // {
return context.DbContextOptions.UseOracle(context.ConnectionString, oracleOptionsAction); // return context.DbContextOptions.UseOracle(context.ConnectionString, oracleOptionsAction);
} // }
} // }
} // }
} // }

64
framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsOracleDevartExtensions.cs

@ -1,32 +1,32 @@
using JetBrains.Annotations; // using JetBrains.Annotations;
using System; // using System;
using Devart.Data.Oracle.Entity; // using Devart.Data.Oracle.Entity;
//
namespace Volo.Abp.EntityFrameworkCore // namespace Volo.Abp.EntityFrameworkCore
{ // {
public static class AbpDbContextOptionsOracleDevartExtensions // public static class AbpDbContextOptionsOracleDevartExtensions
{ // {
public static void UseOracle( // public static void UseOracle(
[NotNull] this AbpDbContextOptions options, // [NotNull] this AbpDbContextOptions options,
[CanBeNull] Action<OracleDbContextOptionsBuilder> oracleOptionsAction = null, // [CanBeNull] Action<OracleDbContextOptionsBuilder> oracleOptionsAction = null,
bool useExistingConnectionIfAvailable = false) // bool useExistingConnectionIfAvailable = false)
{ // {
options.Configure(context => // options.Configure(context =>
{ // {
context.UseOracle(oracleOptionsAction, useExistingConnectionIfAvailable); // context.UseOracle(oracleOptionsAction, useExistingConnectionIfAvailable);
}); // });
} // }
//
public static void UseOracle<TDbContext>( // public static void UseOracle<TDbContext>(
[NotNull] this AbpDbContextOptions options, // [NotNull] this AbpDbContextOptions options,
[CanBeNull] Action<OracleDbContextOptionsBuilder> oracleOptionsAction = null, // [CanBeNull] Action<OracleDbContextOptionsBuilder> oracleOptionsAction = null,
bool useExistingConnectionIfAvailable = false) // bool useExistingConnectionIfAvailable = false)
where TDbContext : AbpDbContext<TDbContext> // where TDbContext : AbpDbContext<TDbContext>
{ // {
options.Configure<TDbContext>(context => // options.Configure<TDbContext>(context =>
{ // {
context.UseOracle(oracleOptionsAction, useExistingConnectionIfAvailable); // context.UseOracle(oracleOptionsAction, useExistingConnectionIfAvailable);
}); // });
} // }
} // }
} // }

44
framework/src/Volo.Abp.EntityFrameworkCore.Oracle.Devart/Volo/Abp/EntityFrameworkCore/Oracle/Devart/AbpEntityFrameworkCoreOracleDevartModule.cs

@ -1,22 +1,22 @@
using Volo.Abp.Guids; // using Volo.Abp.Guids;
using Volo.Abp.Modularity; // using Volo.Abp.Modularity;
//
namespace Volo.Abp.EntityFrameworkCore.Oracle.Devart // namespace Volo.Abp.EntityFrameworkCore.Oracle.Devart
{ // {
[DependsOn( // [DependsOn(
typeof(AbpEntityFrameworkCoreModule) // typeof(AbpEntityFrameworkCoreModule)
)] // )]
public class AbpEntityFrameworkCoreOracleDevartModule : AbpModule // public class AbpEntityFrameworkCoreOracleDevartModule : AbpModule
{ // {
public override void ConfigureServices(ServiceConfigurationContext context) // public override void ConfigureServices(ServiceConfigurationContext context)
{ // {
Configure<AbpSequentialGuidGeneratorOptions>(options => // Configure<AbpSequentialGuidGeneratorOptions>(options =>
{ // {
if (options.DefaultSequentialGuidType == null) // if (options.DefaultSequentialGuidType == null)
{ // {
options.DefaultSequentialGuidType = SequentialGuidType.SequentialAsBinary; // options.DefaultSequentialGuidType = SequentialGuidType.SequentialAsBinary;
} // }
}); // });
} // }
} // }
} // }

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

@ -19,7 +19,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Oracle.EntityFrameworkCore" Version="3.19.80" /> <!--<PackageReference Include="Oracle.EntityFrameworkCore" Version="3.19.80" />-->
</ItemGroup> </ItemGroup>
</Project> </Project>

50
framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextConfigurationContextOracleExtensions.cs

@ -1,25 +1,25 @@
using JetBrains.Annotations; // using JetBrains.Annotations;
using Microsoft.EntityFrameworkCore; // using Microsoft.EntityFrameworkCore;
using System; // using System;
using Oracle.EntityFrameworkCore.Infrastructure; // using Oracle.EntityFrameworkCore.Infrastructure;
using Volo.Abp.EntityFrameworkCore.DependencyInjection; // using Volo.Abp.EntityFrameworkCore.DependencyInjection;
//
namespace Volo.Abp.EntityFrameworkCore // namespace Volo.Abp.EntityFrameworkCore
{ // {
public static class AbpDbContextConfigurationContextOracleExtensions // public static class AbpDbContextConfigurationContextOracleExtensions
{ // {
public static DbContextOptionsBuilder UseOracle( // public static DbContextOptionsBuilder UseOracle(
[NotNull] this AbpDbContextConfigurationContext context, // [NotNull] this AbpDbContextConfigurationContext context,
[CanBeNull] Action<OracleDbContextOptionsBuilder> oracleOptionsAction = null) // [CanBeNull] Action<OracleDbContextOptionsBuilder> oracleOptionsAction = null)
{ // {
if (context.ExistingConnection != null) // if (context.ExistingConnection != null)
{ // {
return context.DbContextOptions.UseOracle(context.ExistingConnection, oracleOptionsAction); // return context.DbContextOptions.UseOracle(context.ExistingConnection, oracleOptionsAction);
} // }
else // else
{ // {
return context.DbContextOptions.UseOracle(context.ConnectionString, oracleOptionsAction); // return context.DbContextOptions.UseOracle(context.ConnectionString, oracleOptionsAction);
} // }
} // }
} // }
} // }

60
framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/AbpDbContextOptionsOracleExtensions.cs

@ -1,30 +1,30 @@
using JetBrains.Annotations; // using JetBrains.Annotations;
using System; // using System;
using Oracle.EntityFrameworkCore.Infrastructure; // using Oracle.EntityFrameworkCore.Infrastructure;
//
namespace Volo.Abp.EntityFrameworkCore // namespace Volo.Abp.EntityFrameworkCore
{ // {
public static class AbpDbContextOptionsOracleExtensions // public static class AbpDbContextOptionsOracleExtensions
{ // {
public static void UseOracle( // public static void UseOracle(
[NotNull] this AbpDbContextOptions options, // [NotNull] this AbpDbContextOptions options,
[CanBeNull] Action<OracleDbContextOptionsBuilder> oracleOptionsAction = null) // [CanBeNull] Action<OracleDbContextOptionsBuilder> oracleOptionsAction = null)
{ // {
options.Configure(context => // options.Configure(context =>
{ // {
context.UseOracle(oracleOptionsAction); // context.UseOracle(oracleOptionsAction);
}); // });
} // }
//
public static void UseOracle<TDbContext>( // public static void UseOracle<TDbContext>(
[NotNull] this AbpDbContextOptions options, // [NotNull] this AbpDbContextOptions options,
[CanBeNull] Action<OracleDbContextOptionsBuilder> oracleOptionsAction = null) // [CanBeNull] Action<OracleDbContextOptionsBuilder> oracleOptionsAction = null)
where TDbContext : AbpDbContext<TDbContext> // where TDbContext : AbpDbContext<TDbContext>
{ // {
options.Configure<TDbContext>(context => // options.Configure<TDbContext>(context =>
{ // {
context.UseOracle(oracleOptionsAction); // context.UseOracle(oracleOptionsAction);
}); // });
} // }
} // }
} // }

44
framework/src/Volo.Abp.EntityFrameworkCore.Oracle/Volo/Abp/EntityFrameworkCore/Oracle/AbpEntityFrameworkCoreOracleModule.cs

@ -1,22 +1,22 @@
using Volo.Abp.Guids; // using Volo.Abp.Guids;
using Volo.Abp.Modularity; // using Volo.Abp.Modularity;
//
namespace Volo.Abp.EntityFrameworkCore.Oracle // namespace Volo.Abp.EntityFrameworkCore.Oracle
{ // {
[DependsOn( // [DependsOn(
typeof(AbpEntityFrameworkCoreModule) // typeof(AbpEntityFrameworkCoreModule)
)] // )]
public class AbpEntityFrameworkCoreOracleModule : AbpModule // public class AbpEntityFrameworkCoreOracleModule : AbpModule
{ // {
public override void ConfigureServices(ServiceConfigurationContext context) // public override void ConfigureServices(ServiceConfigurationContext context)
{ // {
Configure<AbpSequentialGuidGeneratorOptions>(options => // Configure<AbpSequentialGuidGeneratorOptions>(options =>
{ // {
if (options.DefaultSequentialGuidType == null) // if (options.DefaultSequentialGuidType == null)
{ // {
options.DefaultSequentialGuidType = SequentialGuidType.SequentialAsBinary; // options.DefaultSequentialGuidType = SequentialGuidType.SequentialAsBinary;
} // }
}); // });
} // }
} // }
} // }

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

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.1</TargetFramework>
<AssemblyName>Volo.Abp.EntityFrameworkCore.PostgreSql</AssemblyName> <AssemblyName>Volo.Abp.EntityFrameworkCore.PostgreSql</AssemblyName>
<PackageId>Volo.Abp.EntityFrameworkCore.PostgreSql</PackageId> <PackageId>Volo.Abp.EntityFrameworkCore.PostgreSql</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
@ -19,7 +19,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.1.4" /> <PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="5.0.0-rc1" />
</ItemGroup> </ItemGroup>
</Project> </Project>

4
framework/src/Volo.Abp.EntityFrameworkCore.SqlServer/Volo.Abp.EntityFrameworkCore.SqlServer.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.1</TargetFramework>
<AssemblyName>Volo.Abp.EntityFrameworkCore.SqlServer</AssemblyName> <AssemblyName>Volo.Abp.EntityFrameworkCore.SqlServer</AssemblyName>
<PackageId>Volo.Abp.EntityFrameworkCore.SqlServer</PackageId> <PackageId>Volo.Abp.EntityFrameworkCore.SqlServer</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
@ -19,7 +19,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.8" /> <PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="5.0.0-rc.2.*" />
</ItemGroup> </ItemGroup>
</Project> </Project>

4
framework/src/Volo.Abp.EntityFrameworkCore.Sqlite/Volo.Abp.EntityFrameworkCore.Sqlite.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.1</TargetFramework>
<AssemblyName>Volo.Abp.EntityFrameworkCore.Sqlite</AssemblyName> <AssemblyName>Volo.Abp.EntityFrameworkCore.Sqlite</AssemblyName>
<PackageId>Volo.Abp.EntityFrameworkCore.Sqlite</PackageId> <PackageId>Volo.Abp.EntityFrameworkCore.Sqlite</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
@ -15,7 +15,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.8" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="5.0.0-rc.2.*" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>

6
framework/src/Volo.Abp.EntityFrameworkCore/Volo.Abp.EntityFrameworkCore.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.1</TargetFramework>
<AssemblyName>Volo.Abp.EntityFrameworkCore</AssemblyName> <AssemblyName>Volo.Abp.EntityFrameworkCore</AssemblyName>
<PackageId>Volo.Abp.EntityFrameworkCore</PackageId> <PackageId>Volo.Abp.EntityFrameworkCore</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>
@ -20,8 +20,8 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.8" /> <PackageReference Include="Microsoft.EntityFrameworkCore" Version="5.0.0-rc.2.*" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="3.1.8" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="5.0.0-rc.2.*" />
</ItemGroup> </ItemGroup>
</Project> </Project>

15
framework/src/Volo.Abp.EntityFrameworkCore/Volo/Abp/EntityFrameworkCore/DatabaseFacadeExtensions.cs

@ -1,15 +0,0 @@
using Microsoft.EntityFrameworkCore.Infrastructure;
using Microsoft.EntityFrameworkCore.Internal;
namespace Volo.Abp.EntityFrameworkCore
{
public static class DatabaseFacadeExtensions
{
public static bool IsRelational(this DatabaseFacade database)
{
#pragma warning disable EF1001 // Internal EF Core API usage.
return ((IDatabaseFacadeDependenciesAccessor)database).Dependencies is IRelationalDatabaseFacadeDependencies;
#pragma warning restore EF1001 // Internal EF Core API usage.
}
}
}

2
framework/src/Volo.Abp.EventBus.Kafka/Volo.Abp.EventBus.Kafka.csproj

@ -2,7 +2,7 @@
<Import Project="..\..\..\configureawait.props" /> <Import Project="..\..\..\configureawait.props" />
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework> <TargetFramework>netstandard2.0</TargetFramework>
<RootNamespace /> <RootNamespace />

2
framework/src/Volo.Abp.ExceptionHandling/Volo.Abp.ExceptionHandling.csproj

@ -19,7 +19,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="3.1.8" /> <PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="5.0.0-rc.2.*" />
</ItemGroup> </ItemGroup>
</Project> </Project>

2
framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo.Abp.Http.Client.IdentityModel.Web.csproj

@ -4,7 +4,7 @@
<Import Project="..\..\..\common.props" /> <Import Project="..\..\..\common.props" />
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework> <TargetFramework>net5.0</TargetFramework>
<AssemblyName>Volo.Abp.Http.Client.IdentityModel.Web</AssemblyName> <AssemblyName>Volo.Abp.Http.Client.IdentityModel.Web</AssemblyName>
<PackageId>Volo.Abp.Http.Client.IdentityModel.Web</PackageId> <PackageId>Volo.Abp.Http.Client.IdentityModel.Web</PackageId>
<AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback> <AssetTargetFallback>$(AssetTargetFallback);portable-net45+win8+wp8+wpa81;</AssetTargetFallback>

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save