diff --git a/.github/workflows/auto-pr.yml b/.github/workflows/auto-pr.yml new file mode 100644 index 0000000000..987a3ada1b --- /dev/null +++ b/.github/workflows/auto-pr.yml @@ -0,0 +1,24 @@ +name: Merge branch dev with rel-4.2 +on: + push: + branches: + - rel-4.2 +jobs: + merge-dev-with-rel: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: dev + - name: Reset promotion branch + run: | + git fetch origin $GITHUB_REF:$GITHUB_REF + git reset --hard $GITHUB_REF + - name: Create Pull Request + uses: peter-evans/create-pull-request@v3 + with: + branch: auto-merge/rel-4-2/${{github.run_number}} + title: Merge branch dev with rel-4.2 + body: This PR generated automatically to merge dev with rel-4.2. Please review the changed files before merging to prevent any errors that may occur. + reviewers: ${{github.actor}} + token: ${{ github.token }} diff --git a/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json b/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json index a29355b401..a92c20a991 100644 --- a/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json +++ b/abp_io/AbpIoLocalization/AbpIoLocalization/Community/Localization/Resources/en.json @@ -37,7 +37,7 @@ "CreateArticleTitleInfo": "Title of the article to be shown on the article list.", "CreateArticleUrlInfo": "Original GitHub/External URL of the article.", "CreateArticleSummaryInfo": "A short summary of the article to be shown on the article list.", - "CreateArticleCoverInfo": "For creating an effective article, add a cover photo. Upload 16:9 aspect ratio pictures for the best view.", + "CreateArticleCoverInfo": "For creating an effective article, add a cover photo. Upload 16:9 aspect ratio pictures for the best view. Maximum file size: 1MB.", "ThisExtensionIsNotAllowed": "This extension is not allowed.", "TheFileIsTooLarge": "The file is too large.", "GoToTheArticle": "Go to the Article", diff --git a/common.props b/common.props index b79bf61409..39ce965ec0 100644 --- a/common.props +++ b/common.props @@ -1,7 +1,7 @@ latest - 4.1.0-rc.1 + 4.1.0-rc.2 $(NoWarn);CS1591;CS0436 https://abp.io/assets/abp_nupkg.png https://abp.io/ @@ -21,4 +21,4 @@ runtime; build; native; contentfiles; analyzers - \ No newline at end of file + diff --git a/docs/en/Community-Articles/2020-04-19-Customize-the-SignIn-Manager/POST.md b/docs/en/Community-Articles/2020-04-19-Customize-the-SignIn-Manager/POST.md index 1342407880..9ae426624f 100644 --- a/docs/en/Community-Articles/2020-04-19-Customize-the-SignIn-Manager/POST.md +++ b/docs/en/Community-Articles/2020-04-19-Customize-the-SignIn-Manager/POST.md @@ -71,7 +71,8 @@ public async override Task GetE ?? provider; return new Microsoft.AspNetCore.Identity.ExternalLoginInfo(auth.Principal, provider, providerKey, providerDisplayName) { - AuthenticationTokens = auth.Properties.GetTokens() + AuthenticationTokens = auth.Properties.GetTokens(), + AuthenticationProperties = auth.Properties }; } ```` diff --git a/docs/en/Entity-Framework-Core.md b/docs/en/Entity-Framework-Core.md index 8c0a1c9cc9..b2b216397a 100644 --- a/docs/en/Entity-Framework-Core.md +++ b/docs/en/Entity-Framework-Core.md @@ -735,6 +735,47 @@ Configure(options => }); ```` +### Customize Bulk Operations + +If you have better logic or using an external library for bulk operations, you can override the logic via implementing`IEfCoreBulkOperationProvider`. + +- You may use example template below: + +```csharp +public class MyCustomEfCoreBulkOperationProvider : IEfCoreBulkOperationProvider, ITransientDependency +{ + public async Task DeleteManyAsync(IEfCoreRepository repository, + IEnumerable entities, + bool autoSave, + CancellationToken cancellationToken) + where TDbContext : IEfCoreDbContext + where TEntity : class, IEntity + { + // Your logic here. + } + + public async Task InsertManyAsync(IEfCoreRepository repository, + IEnumerable entities, + bool autoSave, + CancellationToken cancellationToken) + where TDbContext : IEfCoreDbContext + where TEntity : class, IEntity + { + // Your logic here. + } + + public async Task UpdateManyAsync(IEfCoreRepository repository, + IEnumerable entities, + bool autoSave, + CancellationToken cancellationToken) + where TDbContext : IEfCoreDbContext + where TEntity : class, IEntity + { + // Your logic here. + } +} +``` + ## See Also * [Entities](Entities.md) diff --git a/docs/en/MongoDB.md b/docs/en/MongoDB.md index 98769c13b8..7fae9c3892 100644 --- a/docs/en/MongoDB.md +++ b/docs/en/MongoDB.md @@ -382,3 +382,44 @@ context.Services.AddMongoDbContext(options => ``` In this example, `OtherMongoDbContext` implements `IBookStoreMongoDbContext`. This feature allows you to have multiple MongoDbContext (one per module) on development, but single MongoDbContext (implements all interfaces of all MongoDbContexts) on runtime. + +### Customize Bulk Operations + +If you have better logic or using an external library for bulk operations, you can override the logic via implementing `IMongoDbBulkOperationProvider`. + +- You may use example template below: + +```csharp +public class MyCustomMongoDbBulkOperationProvider : IMongoDbBulkOperationProvider, ITransientDependency +{ + public async Task DeleteManyAsync(IMongoDbRepository repository, + IEnumerable entities, + IClientSessionHandle sessionHandle, + bool autoSave, + CancellationToken cancellationToken) + where TEntity : class, IEntity + { + // Your logic here. + } + + public async Task InsertManyAsync(IMongoDbRepository repository, + IEnumerable entities, + IClientSessionHandle sessionHandle, + bool autoSave, + CancellationToken cancellationToken) + where TEntity : class, IEntity + { + // Your logic here. + } + + public async Task UpdateManyAsync(IMongoDbRepository repository, + IEnumerable entities, + IClientSessionHandle sessionHandle, + bool autoSave, + CancellationToken cancellationToken) + where TEntity : class, IEntity + { + // Your logic here. + } +} +``` \ No newline at end of file diff --git a/docs/en/Repositories.md b/docs/en/Repositories.md index 5ff8372af8..5ad3107ca6 100644 --- a/docs/en/Repositories.md +++ b/docs/en/Repositories.md @@ -87,6 +87,11 @@ If your entity is a soft-delete entity, you can use the `HardDeleteAsync` method See the [Data Filtering](Data-Filtering.md) documentation for more about soft-delete. +## Bulk Operations +You can execute bulk operations with `InsertManyAsync`, `UpdateManyAsync`, `DeleteManyAsync` methods. + +> **WARNING:** ConcurrencyStamp can't be checked at bulk operations! + ## Custom Repositories Default generic repositories will be sufficient for most cases. However, you may need to create a custom repository class for your entity. diff --git a/docs/en/Samples/Index.md b/docs/en/Samples/Index.md index e0e8c94c45..b5dd0fab29 100644 --- a/docs/en/Samples/Index.md +++ b/docs/en/Samples/Index.md @@ -63,8 +63,7 @@ While there is no Razor Pages & MongoDB combination, you can check both document * **GRPC Demo**: Shows how to add a gRPC service to an ABP Framework based web application and consume it from a console application. * [Source code](https://github.com/abpframework/abp-samples/tree/master/GrpcDemo) * **Telerik Blazor Integration**: Shows how to install and use Telerik Blazor components with the ABP Framework. - * [Source code](https://github.com/abpframework/abp-samples/tree/master/DevExpress-Blazor) - * [Article](https://community.abp.io/articles/using-devexpress-blazor-ui-components-with-the-abp-framework-wrpoa8rw) + * [Article](https://community.abp.io/articles/how-to-integrate-the-telerik-blazor-components-to-the-abp-blazor-ui-q8g31abb) * **Angular Material Integration**: Implemented the web application tutorial using the Angular Material library. * [Source code](https://github.com/abpframework/abp-samples/tree/master/AcmeBookStoreAngularMaterial) * [Article](https://community.abp.io/articles/using-angular-material-components-with-the-abp-framework-af8ft6t9) diff --git a/docs/en/UI/Angular/List-Service.md b/docs/en/UI/Angular/List-Service.md index 016b891159..03e2b5341a 100644 --- a/docs/en/UI/Angular/List-Service.md +++ b/docs/en/UI/Angular/List-Service.md @@ -1,6 +1,6 @@ # Working with Lists -`ListService` is a utility service to provide an easy pagination, sorting, and search implementation. +`ListService` is a utility service to provide easy pagination, sorting, and search implementation. @@ -35,7 +35,10 @@ class BookComponent { constructor( public readonly list: ListService, private bookService: BookService, - ) {} + ) { + // change ListService defaults here + this.list.maxResultCount = 20; + } ngOnInit() { // A function that gets query and returns an observable @@ -164,7 +167,7 @@ You may use observables in combination with [AsyncPipe](https://angular.io/guide ``` -> We do not recommend using NGXS store for CRUD pages, unless your application needs to share list information between components or use it later on in another page. +> We do not recommend using the NGXS store for CRUD pages unless your application needs to share list information between components or use it later on in another page. ## How to Refresh Table on Create/Update/Delete @@ -186,7 +189,7 @@ You may use observables in combination with [AsyncPipe](https://angular.io/guide this.store.dispatch(new DeleteBook(id)).subscribe(this.list.get); ``` -> We donot recommend using NGXS store for CRUD pages, unless your application needs to share list information between components or use it later on in another page. +> We do not recommend using the NGXS store for CRUD pages unless your application needs to share list information between components or use it later on in another page. ## How to Implement Server-Side Search in a Table @@ -210,7 +213,7 @@ We had to modify the `ListService` to make it work with `ngx-datatable`. Previou > ``` -As of v3.0, with ngx-datatable, the `page` property has to be set as `0` for inital page. Therefore, if you used `ListService` on your tables before and are going to keep `abp-table`, you need to make the following change: +As of v3.0, with ngx-datatable, the `page` property has to be set as `0` for the initial page. Therefore, if you used `ListService` on your tables before and are going to keep `abp-table`, you need to make the following change: ```html diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/Branding.razor b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/Branding.razor index ac629423ce..5e0537b2b2 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/Branding.razor +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/Branding.razor @@ -1,3 +1,9 @@ -@using Volo.Abp.Ui.Branding +@using Volo.Abp.Ui.Branding @inject IBrandingProvider BrandingProvider -@BrandingProvider.AppName + + @if (!BrandingProvider.LogoUrl.IsNullOrWhiteSpace()) + { + @BrandingProvider.AppName + } + @BrandingProvider.AppName + diff --git a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/FirstLevelNavMenuItem.razor b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/FirstLevelNavMenuItem.razor index cf6703ade9..b2fab0807d 100644 --- a/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/FirstLevelNavMenuItem.razor +++ b/framework/src/Volo.Abp.AspNetCore.Components.WebAssembly.BasicTheme/Themes/Basic/FirstLevelNavMenuItem.razor @@ -10,7 +10,7 @@ if (MenuItem.Url != null) {