Browse Source

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
pull/15063/head
Ahmad Nidal 4 years ago
committed by GitHub
parent
commit
26fc40eabf
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      docs/en/Tutorials/Part-9.md

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

@ -1115,8 +1115,8 @@ namespace Acme.BookStore.Blazor.Pages
private async Task OnDataGridReadAsync(DataGridReadDataEventArgs<AuthorDto> e) private async Task OnDataGridReadAsync(DataGridReadDataEventArgs<AuthorDto> e)
{ {
CurrentSorting = e.Columns CurrentSorting = e.Columns
.Where(c => c.Direction != SortDirection.None) .Where(c => c.SortDirection != SortDirection.Default)
.Select(c => c.Field + (c.Direction == SortDirection.Descending ? " DESC" : "")) .Select(c => c.Field + (c.SortDirection == SortDirection.Descending ? " DESC" : ""))
.JoinAsString(","); .JoinAsString(",");
CurrentPage = e.Page - 1; CurrentPage = e.Page - 1;
@ -1166,7 +1166,7 @@ namespace Acme.BookStore.Blazor.Pages
private async Task CreateAuthorAsync() private async Task CreateAuthorAsync()
{ {
if (CreateValidationsRef.ValidateAll()) if (CreateValidationsRef.ValidateAll() != null)
{ {
await AuthorAppService.CreateAsync(NewAuthor); await AuthorAppService.CreateAsync(NewAuthor);
await GetAuthorsAsync(); await GetAuthorsAsync();
@ -1176,7 +1176,7 @@ namespace Acme.BookStore.Blazor.Pages
private async Task UpdateAuthorAsync() private async Task UpdateAuthorAsync()
{ {
if (EditValidationsRef.ValidateAll()) if (EditValidationsRef.ValidateAll() != null)
{ {
await AuthorAppService.UpdateAsync(EditingAuthorId, EditingAuthor); await AuthorAppService.UpdateAsync(EditingAuthorId, EditingAuthor);
await GetAuthorsAsync(); await GetAuthorsAsync();
@ -1208,7 +1208,7 @@ Open the `BookStoreMenuContributor.cs` in the `Acme.BookStore.Blazor` project an
````csharp ````csharp
if (await context.IsGrantedAsync(BookStorePermissions.Authors.Default)) if (await context.IsGrantedAsync(BookStorePermissions.Authors.Default))
{ {
bookStoreMenu.AddItem(new ApplicationMenuItem( context.Menu.AddItem(new ApplicationMenuItem(
"BooksStore.Authors", "BooksStore.Authors",
l["Menu:Authors"], l["Menu:Authors"],
url: "/authors" url: "/authors"

Loading…
Cancel
Save