api-crud-development

Implement complete CRUD APIs from entities to migrations for .NET projects.

56|14|Updated Dec 30, 2024
One-click install
npx skills add https://github.com/xin-lai/CodeSpirit --skill api-crud-development
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: api-crud-development
Source: https://github.com/xin-lai/CodeSpirit/tree/main/.cursor/skills/api-crud-development
Command: npx skills add https://github.com/xin-lai/CodeSpirit --skill api-crud-development

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill removes the repetitive, error-prone work of handcrafting end-to-end CRUD endpoints by providing a clear, step-by-step development workflow from entity design to controller and database migration.

Core Features & Use Cases

  • Step-by-step workflow: Covers entity creation, DTO design, AutoMapper profiles, service interfaces and implementations, controller patterns, DbContext configuration, and migration generation.
  • Reusable templates: Provides code templates for entities, DTOs, services, and controllers to accelerate consistent implementation.
  • Enterprise concerns: Advises audit fields, multi-tenant support, activation flags, long ID strategies, validation attributes, and AMIS UI annotations.
  • Migration guidance: Includes instructions for creating migrations for MySQL and SQL Server to keep schema and code in sync.
  • Use Case: Quickly add an Employee management module that includes list/detail APIs, create/update/delete operations, paged queries, and bulk actions.

Quick Start

Create a new Employee CRUD module by following the seven-step flow: define the entity, add DTOs, configure AutoMapper, implement the service, build the controller, configure the DbContext, and run database migrations.

Frequently Asked Questions about api-crud-development

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate CRUD APIs from entity models in a .NET multi-tenant application?

To generate CRUD APIs from entity models, you follow a seven-step workflow: define the entity, add DTOs, configure AutoMapper, implement the service, build the controller, configure DbContext, and run database migrations for MySQL or SQL Server.

What is the step-by-step process for creating a CRUD API module with DTOs and AutoMapper?

The step-by-step process for creating a CRUD API module involves designing entities with audit fields, creating UI-driven DTOs, configuring AutoMapper profiles, implementing repository-based services, building controller contracts, and generating migration scripts.

Does this CRUD API generation approach support both MySQL and SQL Server database migrations?

Yes, this CRUD API generation approach supports both MySQL and SQL Server database migrations, providing specific instructions to keep your database schema and code in sync across multi-tenant enterprise applications.

Can I use AMIS UI annotations and long numeric IDs when building CRUD endpoints?

Yes, you can use AMIS UI annotations and long numeric IDs when building CRUD endpoints, as the workflow ensures these enterprise concerns along with multi-tenant support and activation flags are applied to your entity models and DTOs.

What's the best way to add a complete Employee management CRUD module to a .NET backend?

The best way to add a complete Employee management CRUD module is to use reusable templates for entities, DTOs, services, and controllers, enabling you to quickly implement list/detail APIs, paged queries, and bulk actions.

Why does my multi-tenant CRUD API need activation flags and audit fields in entity models?

Your multi-tenant CRUD API needs activation flags and audit fields in entity models to meet enterprise application requirements, ensuring data integrity, proper tenant isolation, and tracking across all create, update, and delete operations.