ASP.NET Core web application for contact management with CSV import functionality.
Clean Architecture implementation with clear separation of concerns:
Domain entities and interfaces independent of external dependencies.
- Entities: Domain models (Contact, ErrorViewModel)
- Interfaces: Repository and service contracts
External dependencies and data access implementations.
- Data: DbContext and database configurations
- Repositories: Data access implementations
- Services: Business logic implementations
Presentation logic and user interface.
- Controllers: HTTP request handlers
- DTOs: Data transfer objects with validation
- Views: Razor templates
- Middleware: Custom middleware components
- .NET 8.0 SDK
- Docker and Docker Compose (recommended)
- SQL Server 2022 (if not using Docker)
docker-compose up --buildApplication available at: http://localhost:5000
-
Configure database connection:
cp TestApp/appsettings.Development.json.example TestApp/appsettings.Development.json
Update connection string with your credentials.
-
Run migrations:
dotnet ef database update --project TestApp/TestApp.csproj
-
Start application:
dotnet run --project TestApp/TestApp.csproj
- Contact CRUD operations
- CSV file import with validation
- Asynchronous data operations
- Structured logging
- Global exception handling
- Data validation with DTOs
- ASP.NET Core 8.0
- Entity Framework Core
- SQL Server 2022
- Docker
TestApp/
├── Core/
│ ├── Entities/ # Domain models
│ └── Interfaces/ # Repository and service contracts
├── Infrastructure/
│ ├── Data/ # DbContext and migrations
│ ├── Repositories/ # Data access implementations
│ └── Services/ # Business logic implementations
└── Web/
├── Controllers/ # HTTP endpoints
├── DTOs/ # Data transfer objects
├── Middleware/ # Custom middleware
├── Views/ # Razor views
└── wwwroot/ # Static files
Connection strings and logging configuration are managed through appsettings.json. Environment-specific settings should be placed in appsettings.Development.json or appsettings.Production.json.
For production deployments, use environment variables or secure secret management solutions.