A RESTful API built with .NET 6 for managing products. Provides basic CRUD operations with SQL Server integration and Swagger/OpenAPI documentation.
- βοΈ Backend: ASP.NET Core 6, C#
- ποΈ Database: MS SQL Server
- π§ͺ Others: Docker, Portainer, Git, Swagger, WSL, ngrok (optional for live connection testing)
- β Create Product (POST /api/products) β Adds a new product.
- β List Products (GET /api/products) β Retrieves all products.
- β Get Product Details (GET /api/products/{id}) β Retrieves a specific product by ID.
- β Delete Product (DELETE /api/products/{id}) β Deletes a product.
- β‘ Layered Architecture: Controller β Service β Repository
- β‘ Asynchronous programming (async/await)
- β‘ Swagger API documentation
- β‘ Global exception handling
You can test the API endpoints via Swagger UI.
π FirstProductProject/
βββ ProductApi/
βββ ProductApi
βββ ProductApi.BusinessLayer
βββ ProductApi.DataAccessLayer
βββ ProductApi.EntityLayer
βββ .dockerignore
βββ ProductApi.sln
βββ .gitignore/
βββ Dockerfile/
βββ LICENSE
βββ README.md
Follow the steps below to clone and run this project locally.
# 1. Clone the repo
git clone https://github.com/yasinramazangok/FirstProductProject
# 2. Navigate into the directory
cd FirstProductProject
# 3. (Optional) Set up database / environment
# dotnet ef database update
# 4. Run the project
dotnet run- Implementing layered architecture in ASP.NET Core (Controller β Service β Repository)
- Performing CRUD operations with Entity Framework Core
- Setting up Swagger for API documentation
- Using async/await for asynchronous operations
- Handling global exceptions
- π Add CI/CD pipeline
- π± Mobile responsiveness
- π Multi-language support (i18n)
- π§ͺ Add unit/integration testing
Contributions, issues, and feature requests are welcome!
Feel free to Fork this repo and submit a Pull Request.
Yasin Ramazan GΓK
π LinkedIn: @yasinramazangok
π§ Email: yasinrmzngok@gmail.com
π GitHub: @yasinramazangok
This project is licensed under the MIT License β see the LICENSE file for details.