A .NET 9 REST API demonstration project that mirrors the functionality of the frye/go-users-demo repository. This project is designed for practicing GitHub Copilot features and Test-Driven Development with ASP.NET Core.
net-users-demo/
├── net-users-api/ # ASP.NET Core Web API project
│ ├── Controllers/
│ │ ├── HomeController.cs # Handles root endpoint with HTML view
│ │ └── UsersController.cs # REST API endpoints for user management
│ ├── Models/
│ │ └── UserProfile.cs # User profile data model
│ ├── Views/
│ │ └── Home/
│ │ └── Index.cshtml # HTML view displaying users in a table
│ ├── Program.cs # Application entry point and configuration
│ ├── README.md # Project-specific documentation
│ ├── Copilot_Practice_Instructions.md
│ └── Copilot_TDD_Practice_Instructions.md
└── net-users-demo.sln # Solution file
- RESTful API for user profile management
- HTML table view at root endpoint for user-friendly display
- In-memory data storage (simple list)
- Structured for learning - includes TODO functionality for practice
- GitHub Copilot practice exercises included
GET /- Display users in an HTML tableGET /api/v1/users- Get all users (JSON)GET /api/v1/users/{id}- Get a specific user by IDPOST /api/v1/users- Create a new userPUT /api/v1/users/{id}- Update an existing userDELETE /api/v1/users/{id}- Delete a user (TODO: Not yet implemented)
Each user profile contains:
id- String identifierfullName- User's full nameemoji- An emoji representing the user
Sample users:
- John Doe 😀
- Jane Smith 🚀
- Robert Johnson 🎸
- .NET 9.0 SDK or newer
- Visual Studio Code (recommended) with C# Dev Kit extension
- GitHub Copilot (for practice exercises)
-
Clone the repository:
git clone <repository-url> cd net-users-demo
-
Restore dependencies:
dotnet restore
dotnet run --project net-users-apicd net-users-api
dotnet runThe application will start on http://localhost:8080
open http://localhost:8080curl http://localhost:8080/api/v1/userscurl http://localhost:8080/api/v1/users/1curl -X POST http://localhost:8080/api/v1/users \
-H "Content-Type: application/json" \
-d '{"id":"4", "fullName":"Alice Cooper", "emoji":"🎭"}'curl -X PUT http://localhost:8080/api/v1/users/1 \
-H "Content-Type: application/json" \
-d '{"id":"1", "fullName":"John Smith", "emoji":"😎"}'curl -X DELETE http://localhost:8080/api/v1/users/1This project includes comprehensive practice materials for learning GitHub Copilot:
-
Copilot_Practice_Instructions.md - Learn GitHub Copilot basics:
- Inline code completion
- Ask/Edit mode
- Copilot CLI
- Agent mode
-
Copilot_TDD_Practice_Instructions.md - Practice Test-Driven Development:
- Using Testing custom chat mode
- Using TDD custom chat mode
- Red-Green-Refactor cycle
- Test coverage analysis
- Advanced Practice Instructions - Comprehensive advanced exercises:
- 📝 10 Modules covering real-world scenarios
- 🌱 GitHub Spec-Kit introduction for structured development
- 🎓 Capstone Projects for advanced challenges
- 💡 Best Practices and professional patterns
Topics Include:
- CRUD operations & API design enhancements
- Input validation & error handling
- Comprehensive testing strategies (unit, integration, property-based)
- Repository pattern & database migrations
- Configuration management & secrets
- Authentication & authorization (API keys, JWT)
- Observability (logging, metrics, tracing)
- Documentation & developer experience
- CI/CD pipelines & automation
- Architecture & scalability patterns
👉 Start with the Advanced Practice Guide →
This .NET implementation mirrors the frye/go-users-demo project:
| Feature | Go Demo | .NET Demo |
|---|---|---|
| Framework | Gin | ASP.NET Core |
| Language | Go | C# |
| View Engine | Go templates | Razor |
| Port | 8080 | 8080 |
| Data Storage | In-memory slice | In-memory List |
| DeleteUser | TODO | TODO |
| Sample Users | 3 users | 3 users (same) |
dotnet builddotnet testdotnet cleanThis project is for educational purposes.
This is a demonstration project for learning GitHub Copilot and TDD practices. Feel free to use it as a template for your own learning.