Blazor page editing entity

From IntentArchitect/Intent.Modules.NET · View interactive version

Blazor page editing entity is an AI agent skill from the GitHub repository IntentArchitect/Intent.Modules.NET. Creates Blazor edit or update entity pages using MudBlazor forms, preserving existing .razor.cs loading, service, and navigation behavior while wiring a valid save flow and model-bound UI. Use when implementing edit, update, or modify entity pages in Blazor.

How to use this skill

Skill file

MANDATORY: Read Samples Before Implementation

STOP - You MUST read ALL sample files in the SAME folder as this SKILL.md before writing ANY code:

  1. edit-entity-sample.razor
  2. edit-entity-sample.razor.cs

Then read the target component .razor, .razor.cs, and related project files such as models, enums, lookups, services, and shared styles.

If any sample file cannot be accessed: stop immediately, confirm the SKILL.md folder location, retry from that location, and if still inaccessible report which file is missing. Do not proceed with partial implementation or approximation.


Preserve Existing Implementation

Use for: Edit or update entity pages in Blazor with MudBlazor

Do NOT use for: Search pages, add pages, dialogs, or non-Blazor projects

Source of truth: Existing .razor.cs file defines data loading, service calls, navigation, and model structure

You MUST NOT:


1. Data Loading And Form

Load data through existing lifecycle methods and backing methods such as OnInitializedAsync(), OnParametersSetAsync(), or existing load methods.

Build the form only from the existing model structure.

Nullable objects:


2. Map Properties To MudBlazor Controls

| Property Type | Control |

|---------------|---------|

| String | MudTextField |

| Boolean | MudSwitch or MudCheckBox |

| Enum | MudSelect with verified numeric values |

| Lookup | MudSelect using real loaded options |

| Array | Repeatable MudBlazor blocks |

MudBlazor rules:

Enum rules:


3. Validation

Use valid Blazor EditForm patterns with the project's existing validation approach.

Required fields must have:

If using MudBlazor validation delegates, ensure signatures and nullability are correct.

If multiple forms are used, they must not be nested.


4. Save Flow

The Save button must call Save() or SaveAsync().

That flow must:

  1. Validate the form
  2. Call the existing update method without modifying it
  3. Navigate on success using an existing navigation method when one exists

Forbidden:


5. Child Collections

Render child collections in repeatable MudBlazor UI blocks.

Buttons:

Indexed bindings:


6. Styling

Design context (if design.md is present)

If a design.md file exists in the project, read it before choosing MudBlazor component properties. Use it for:

design.md informs prop choices only — it does not override the sample's layout structure.


Definition of Done

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.