# Create Datadriven Aspnetcore

Generate or scaffold ASP.NET Core code, Razor Pages, Blazor components, MVC...

- Repository: https://github.com/dotnet/skills (5787 stars)
- Category: Design
- License: MIT
- Last updated: 2026-11-01
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add dotnet/skills --skill create-datadriven-aspnetcore -g -a claude-code -y`
Codex: `npx skills add dotnet/skills --skill create-datadriven-aspnetcore -g -a codex -y`
Cursor: `npx skills add dotnet/skills --skill create-datadriven-aspnetcore -g -a cursor -y`
Gemini CLI: `npx skills add dotnet/skills --skill create-datadriven-aspnetcore -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add dotnet/skills`

## Description

Generate or scaffold ASP.NET Core code, Razor Pages, Blazor components, MVC controllers, views, and Minimal API endpoints, without using ASP.NET Core CLI scaffolding/code-generation tools. Use when (1) adding CRUD pages, views, or API endpoints backed by Entity Framework (EF Core) and a database, (2) generating code to create, read, update, and delete data using a DbContext, (3) scaffolding UI components that match the project's existing CSS framework and coding patterns, or (4) creating data-driven forms, tables, and navigation for a model class. Do not use for non-ASP.NET projects or when CLI-based scaffolding is preferred.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Generate or Scaffold ASP.NET Core Code

Generate ASP.NET Core scaffolded code, controllers, views, Razor Pages, Blazor components, Minimal API endpoints. The generated code matches the project's existing CSS framework, layout conventions, and coding patterns. No CLI-based scaffolding/code-generation tools are used; standard `dotnet` CLI commands for build, restore, and migrations are still expected.

## When to Use

- Adding CRUD pages, views, or components for a model in an ASP.NET Core project
- Scaffolding API controllers or Minimal API endpoints with Entity Framework Core
- Generating Razor Pages, MVC views, or Blazor components backed by a DbContext

## When Not to Use

- The project is not an ASP.NET Core project
- You need to scaffold non-web artifacts (class libraries, console apps, etc.)

## Inputs

| Input | Required | Description |
|-------|----------|-------------|
| Scaffolding request | Yes | Natural-language description of what to scaffold (see format below) |
| Project file path | Yes | Full path to the target `.csproj` file |
| Solution root path | Recommended | Path to the solution root for multi-project solutions |

### Scaffolding Request Format

The scaffolding request should be a natural-language description of what to scaffold. The request must include the target project path and enough detail for the agent to generate the correct code. Examples:

**Razor Pages with EF:**
```
Scaffold Razor Pages with CRUD for the `<ModelName>` model (from `<Namespace>`) in project `<path-to-csproj>`.
Create a new DbContext `<DbContextName>` using <database-provider>.
Also scaffold CRUD for any entity that `<ModelName>` depends on via required foreign keys, so parent entities can be created first.
```

**Blazor CRUD components:**
```
Scaffold Blazor CRUD components for the `<ModelName>` model (from `<Namespace>`) in project `<path-to-csproj>`.
Create a new DbContext `<DbContextName>` using <database-provider>.
```

The rest: https://github.com/dotnet/skills/blob/HEAD/plugins/dotnet-data/skills/create-datadriven-aspnetcore/SKILL.md
