Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

programming-languages-38562/csharp-asp.net-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

C# + ASP.NET Core: A Simple RESTful API Guide

This guide is designed to help students learn the basics of building RESTful APIs using .NET 8 (LTS) and ASP.NET Core, while following a layered architecture.

🎯 Purpose of this Guide

  • Introduce students to ASP.NET Core Web API and project setup using the .NET SDK.
  • Teach the concept of layered architecture (Model, Service, Controller) while skipping the repository for now by using Collections/Dictionary as an in-memory database.
  • Provide a hands-on exercise in creating, retrieving, updating, and deleting student records through simple GET, POST, PUT, and DELETE endpoints.
  • Reinforce core OOP concepts such as encapsulation (in the model) and abstraction (in the service interface).
  • Explain the purpose of attributes like [ApiController] and [Route] in ASP.NET Core.
  • Practice API testing using Postman.

⚠️ Rules & Important Notes ❗ Failure to follow instructions will result in grade deductions.

  • Always follow the layered architecture layout (Model → Service → Controller).
  • Use .NET 8 LTS for this activity.
  • Use HTTP port 9090 for consistency.
  • Do not modify Program.cs unnecessarily—the controller will handle the endpoints.
  • Ensure proper encapsulation in models and abstraction in service interfaces.

📝 Commit Message Guidelines

  • When submitting your work, follow these commit message rules:
  • feat: → For new activities submission or adding new features
  • chore: → Cleanup or general chores
  • fix: → Fixes or debugging activities

Example:

feat: add Student model and service interface chore: cleanup unused files fix: update student retrieval logic

📝 Pull Request Title Guidelines

When creating a Pull Request (PR), use the following format:

activity-name [LASTNAME]

Example: csharp-aspnet-api [AMPATIN]

This sets the expectations, rules, and workflow for students, similar to your Spring Boot guide but tailored for C# ASP.NET Core.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published