From 26fc40eabf94808d551bcd9829669f42edcf130d Mon Sep 17 00:00:00 2001 From: Ahmad Nidal <79116096+Ahmad-Nidal@users.noreply.github.com> Date: Sun, 11 Dec 2022 22:47:12 +0300 Subject: [PATCH] Update tutorial Part-9.md Solve code errors in Authors.razor.cs and BookStoreMenuContributor.cs from the tutorial: https://docs.abp.io/en/abp/latest/Tutorials/Part-9?UI=BlazorServer&DB=EF --- docs/en/Tutorials/Part-9.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/en/Tutorials/Part-9.md b/docs/en/Tutorials/Part-9.md index 4e7914eba1..2e389cc5b5 100644 --- a/docs/en/Tutorials/Part-9.md +++ b/docs/en/Tutorials/Part-9.md @@ -1115,8 +1115,8 @@ namespace Acme.BookStore.Blazor.Pages private async Task OnDataGridReadAsync(DataGridReadDataEventArgs e) { CurrentSorting = e.Columns - .Where(c => c.Direction != SortDirection.None) - .Select(c => c.Field + (c.Direction == SortDirection.Descending ? " DESC" : "")) + .Where(c => c.SortDirection != SortDirection.Default) + .Select(c => c.Field + (c.SortDirection == SortDirection.Descending ? " DESC" : "")) .JoinAsString(","); CurrentPage = e.Page - 1; @@ -1166,7 +1166,7 @@ namespace Acme.BookStore.Blazor.Pages private async Task CreateAuthorAsync() { - if (CreateValidationsRef.ValidateAll()) + if (CreateValidationsRef.ValidateAll() != null) { await AuthorAppService.CreateAsync(NewAuthor); await GetAuthorsAsync(); @@ -1176,7 +1176,7 @@ namespace Acme.BookStore.Blazor.Pages private async Task UpdateAuthorAsync() { - if (EditValidationsRef.ValidateAll()) + if (EditValidationsRef.ValidateAll() != null) { await AuthorAppService.UpdateAsync(EditingAuthorId, EditingAuthor); await GetAuthorsAsync(); @@ -1208,7 +1208,7 @@ Open the `BookStoreMenuContributor.cs` in the `Acme.BookStore.Blazor` project an ````csharp if (await context.IsGrantedAsync(BookStorePermissions.Authors.Default)) { - bookStoreMenu.AddItem(new ApplicationMenuItem( + context.Menu.AddItem(new ApplicationMenuItem( "BooksStore.Authors", l["Menu:Authors"], url: "/authors"