Gist f227f5d1e19ba9632c805fd11e03a76a
✓ Published0🌍 Public
Aabonello
Last edited Mar 15, 2026
Created on Mar 15, 2026
This example demonstrates a minimal CRUD API for managing customer records, built with ASP.NET Core and Entity Framework Core. It defines endpoints for creating, reading, updating, and deleting customers, with each operation interacting with a SQL Server database via `AppDbContext`. The code includes commented-out seed data and console output for testing, while the active HTTP routes use `MapGet`, `MapPost`, `MapPut`, and `MapDelete` to return JSON results through `Results.Ok`, `Results.Created`, and `Results.NotFound`. Swagger UI is enabled in development to document the API endpoints.
AI-generated description