Mapeg.Microservice.Template
1.1.0
dotnet new install Mapeg.Microservice.Template@1.1.0
This package contains a .NET Template Package you can call from the shell/command line.
Mapeg Microservice Template
MAPEG projesi için Domain-Driven Design (DDD) ve Clean Architecture prensiplerini takip eden .NET mikroservis template'i.
🚀 Kurulum
dotnet new install Mapeg.Microservice.Template
📦 Kullanım
dotnet new mapeg-microservice -n ServisAdi
🏗️ Oluşturulan Yapı
ServisAdi/
├── ServisAdi.API/ # Web API katmanı
│ ├── Controllers/ # API Controllers
│ ├── Middleware/ # Custom middleware
│ └── Program.cs # Application entry point
├── ServisAdi.Application/ # Business logic katmanı
│ ├── Features/ # CQRS Commands & Queries
│ ├── DTOs/ # Data Transfer Objects
│ ├── Interfaces/ # Application interfaces
│ └── Services/ # Application services
├── ServisAdi.Domain/ # Domain katmanı
│ ├── Entities/ # Domain entities
│ ├── Enums/ # Domain enums
│ ├── ValueObjects/ # Value objects
│ └── Events/ # Domain events
├── ServisAdi.Infrastructure/ # Infrastructure katmanı
│ ├── Persistence/ # EF Core DbContext
│ ├── Repositories/ # Repository implementations
│ └── Services/ # External service integrations
└── ServisAdi.Contracts/ # Shared contracts
└── DTOs/ # Shared DTOs
✨ Özellikler
- ✅ Domain-Driven Design (DDD) - Domain odaklı tasarım
- ✅ Clean Architecture - Temiz mimari prensipleri
- ✅ CQRS Pattern - MediatR ile Command/Query ayrımı
- ✅ Repository Pattern - Generic repository ve Unit of Work
- ✅ Entity Framework Core - Code First yaklaşımı
- ✅ FluentValidation - Input validation
- ✅ AutoMapper - Object mapping
- ✅ Swagger/OpenAPI - API dokümantasyonu
- ✅ Docker Support - Containerization ready
- ✅ Health Checks - Sağlık kontrolleri
- ✅ Zero Warnings - Temiz build
🛠️ Teknolojiler
- .NET 9.0
- Entity Framework Core 9.0
- MediatR 12.0
- FluentValidation 11.0
- AutoMapper 13.0
- Swagger/OpenAPI
- Docker & Kubernetes ready
📋 Gereksinimler
- .NET 9.0 SDK veya üzeri
- SQL Server veya PostgreSQL
- Docker (opsiyonel)
🚀 Hızlı Başlangıç
1. Yeni Mikroservis Oluştur
dotnet new mapeg-microservice -n Envanter
cd Envanter
2. Veritabanı Bağlantısını Ayarla
appsettings.json:
{
"ConnectionStrings": {
"DefaultConnection": "Server=localhost;Database=EnvanterDB;User Id=sa;Password=YourPassword"
}
}
3. Migration Oluştur ve Uygula
dotnet ef migrations add InitialCreate --project Envanter.Infrastructure --startup-project Envanter.API
dotnet ef database update --project Envanter.Infrastructure --startup-project Envanter.API
4. Servisi Çalıştır
dotnet run --project Envanter.API
Swagger UI: https://localhost:5001/swagger
📚 UseCase Ekleme
CRUD operasyonları eklemek için Mapeg.UseCase.Template kullanın:
dotnet new install Mapeg.UseCase.Template
cd Envanter.Application/Features
dotnet new mapeg-usecase --featureName Products --usecaseType all --entityName Product
🔧 Konfigürasyon
Veritabanı Seçimi
Repository paketi sayesinde veritabanı konfigürasyonu otomatik olarak yapılır. appsettings.json dosyasında connection string ve database tipini belirtmeniz yeterlidir.
📞 Destek
MAPEG Development Team
yazilim@mapeg.gov.tr
📄 Lisans
MIT
-
net9.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.