Prompt file imported from smss123/ABP-ai-skills (
.windsurf/workflows/abp-razor-page.md). Copyright stays with the author.
ABP Razor Pages UI Scaffold
A Windsurf Cascade workflow that creates a complete Razor Pages UI for managing an ABP entity.
Inputs
Before starting, ask the user:
- Entity name (PascalCase, singular, e.g.
Product) - Entity properties to show in the list (e.g. Name, Price, Type)
- DTO properties for create/edit form (usually same as CreateUpdateDto)
- Have the application service and permissions already been created?
Step 1 — Read reference files
Read:
abp-dev/references/ui-razorpages.mdabp-dev/references/authorization.md
Step 2 — Index page
Create src/Acme.BookStore.Web/Pages/<Entity>s/Index.cshtml.cs:
- Extend
AbpPageModel;OnGet()is a no-op (data loaded via AJAX)
Create src/Acme.BookStore.Web/Pages/<Entity>s/Index.cshtml:
- ABP card with permission-guarded "New" button and DataTable
Step 3 — Index.js (DataTable + ModalManager)
Create src/Acme.BookStore.Web/Pages/<Entity>s/Index.js:
abp.ModalManagerfor create and editDataTablewithserverSide: true,createAjaxpointing at the auto-generated JS proxyrowActionitems: Edit (if Edit permission granted), Delete (if Delete permission, with confirm)- Column defs for the properties chosen in inputs
Step 4 — Create modal
Create Pages/<Entity>s/CreateModal.cshtml.cs:
[BindProperty] CreateUpdate<Entity>Dto <Entity>+OnPostAsync()callsCreateAsync
Create Pages/<Entity>s/CreateModal.cshtml:
<abp-modal>with<abp-input>/<abp-select>per property
Step 5 — Edit modal
Create Pages/<Entity>s/EditModal.cshtml.cs:
[HiddenInput][BindProperty(SupportsGet = true)] Guid IdOnGetAsync()loads and maps entity via ObjectMapperOnPostAsync()callsUpdateAsync
Create Pages/<Entity>s/EditModal.cshtml:
- Same structure as Create modal, plus hidden
Idfield
Step 6 — Menu registration
Show the ApplicationMenuItem snippet for BookStoreMenuContributor and the AuthorizePage conventions for the Web module's ConfigureServices.
Step 7 — AutoMapper Web profile entry
Show the reverse mapping to add to BookStoreWebAutoMapperProfile:
CreateMap<<Entity>Dto, CreateUpdate<Entity>Dto>();
Step 8 — Confirm
Ask whether localization keys for the new page labels and menu items should also be added to en.json.