create-controller

Installation
SKILL.md

Create API Controller

Create a controller for a given entity in an ASP.NET Core Web API project.

Pre-requisites

  • Use Controller-based APIs
  • Use System.Text.Json for all JSON data
  • The project uses Entity Framework Core 9 — do not install additional packages, the project is already set up.

Steps

  1. Create an empty controller with the naming rule: {EntityName}Controller

  2. Set up DI and inject Entity Framework context and ILogger<T>.

  3. Do not use Entity Class for model binding. Create DTO classes for each CRUD operation instead.

  4. Add CRUD REST API methods with required OpenAPI-related annotations.

Installs
8
GitHub Stars
19
First Seen
Mar 1, 2026
create-controller — jim60105/copilot-prompt