Blazor dialog editing entity

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

Blazor dialog editing entity is an AI agent skill from the GitHub repository IntentArchitect/Intent.Modules.NET. Creates Blazor edit or update entity dialogs using MudBlazor dialog patterns and valid form submission, preserving existing .razor.cs loading and service behavior while wiring save and cancel correctly. Use when implementing edit or update entity dialogs 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-dialog-sample.razor
  2. edit-entity-dialog-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 dialogs in Blazor with MudBlazor

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

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

This is a dialog: close or cancel through MudBlazor dialog APIs rather than navigation

You MUST NOT:


1. Dialog Structure And Data Loading

This component is a MudBlazor dialog, not a page.

Dialog rules:

Data loading:


2. Save And Cancel Methods

Save() or SaveAsync():

  1. Validate the form
  2. Call the existing update method without modification
  3. On success, close the dialog with a success result
  4. On error, keep the dialog open and set existing error state such as serviceErrors.*

Cancel():

Template bindings:


3. Form Validation

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

Required fields must have:

Save button state:


4. Control Mapping

| Property Type | Control |

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

| String | MudTextField |

| Boolean | MudSwitch or MudCheckBox |

| Enum | MudSelect with verified numeric values |

| Lookup | MudSelect from real option sources only |

| Array | Repeatable MudBlazor blocks |

MudBlazor rules:


5. Child Collections


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.