diff --git a/docs/en/Tutorials/Part-3.md b/docs/en/Tutorials/Part-3.md index 1714aa8485..522e3a4676 100644 --- a/docs/en/Tutorials/Part-3.md +++ b/docs/en/Tutorials/Part-3.md @@ -1355,6 +1355,193 @@ You can now run the application and try to edit a book. ![blazor-edit-book-modal](images/blazor-edit-book-modal.png) +## Deleting a Book + +Open the `Books.razor` page and add the following `DropdownItem` under the "Edit" action inside the "Actions" `DropdownMenu`: + +````xml + + @L["Delete"] + +```` + +* `DeleteEntityAsync` is defined in the base class. + +Run the application and try to delete a book. + +## Full CRUD UI Code + +Here the complete code to create the book management CRUD page, that has been developed in the last two parts: + +````xml +@page "/books" +@using Volo.Abp.Application.Dtos +@using Volo.Abp.BlazoriseUI +@using Acme.BookStore.Books +@using Acme.BookStore.Localization +@using Microsoft.Extensions.Localization +@inject IStringLocalizer L +@inherits BlazoriseCrudPageBase + + + + + +

@L["Books"]

+
+ + + + + +
+
+ + + + + + + + @L["Actions"] + + + + @L["Edit"] + + + @L["Delete"] + + + + + + + + + @L[$"Enum:BookType:{(int) context.Type}"] + + + + + @context.PublishDate.ToShortDateString() + + + + + + + @context.CreationTime.ToLongDateString() + + + + + +
+ + + + + + @L["NewBook"] + + + + + @L["Name"] + + + + @L["Type"] + + + + @L["PublishDate"] + + + + @L["Price"] + + + + + + + + + + + + + + + @EditingEntity.Name + + + + + @L["Name"] + + + + @L["Type"] + + + + @L["PublishDate"] + + + + @L["Price"] + + + + + + + + + +```` + {{end}} ## The Next Part