This repository contains a .NET 8.0 MVC application for managing contacts with advanced functionalities and modern software engineering practices.
The solution demonstrates concepts such as Clean Architecture, Repository Pattern, Authentication & Authorization with Identity & Roles, Logging, Testing, and exporting data as PDF/CSV/Excel.
- Structured into layers (Core, Infrastructure, UI, Tests).
- Enforced separation of concerns and testability.
- SQL Server.
- Repository Pattern for data access.
- LINQ for querying and data manipulation.
- ASP.NET Core Identity for user management.
- Role-based and policy-based authorization.
- Serilog for structured logging and better monitoring.
- xUnit, Moq, Fluent Assertions for unit testing.
- Integration Testing for end-to-end scenarios.
- Generate and download PDF, CSV, Excel reports.
- Used
asyncandawaitfor scalability and responsiveness.
- Fully responsive UI with Bootstrap.
- CRUD operations for managing persons and countries.
- Search, filter, and newsletter subscription features.
- .NET 8.0 MVC
- Entity Framework Core
- Repository Pattern
- Serilog Logging
- ASP.NET Core Identity
- xUnit, Moq, Fluent Assertions
- Integration Testing
- LINQ
- Bootstrap
- SQL Server
ContactsManager
│
├── ContactsManager.Core # Core layer (business logic & contracts)
│ ├── DTO # Data Transfer Objects
│ ├── Domain # Domain Layer
│ │ ├── Entities # Domain entities (Person, Country, etc.)
│ │ └── RepositoryContracts # Interfaces for repositories
│ ├── Enums # Enumerations
│ ├── Exceptions # Custom exception handling
│ ├── Helpers # Helper classes
│ ├── ServiceContracts # Interfaces for services
│ └── Services # Business services implementations
│
├── ContactsManager.Infrastructure # Data access & persistence
│ ├── DbContext # ApplicationDbContext and EF Core configs
│ ├── Migrations # EF Core migrations
│ └── Repositories # Repository implementations
│
├── ContactsManager.UI # ASP.NET Core MVC (Presentation Layer)
│ ├── Controllers # MVC Controllers (Person, Country, Account)
│ ├── Filters # Custom filters
│ ├── Middleware # Custom middleware
│ ├── Properties # Project properties
│ ├── StartupExtensions # Extension methods for DI & middleware
│ ├── Views # Razor views (CRUD, Authentication, etc.)
│ └── wwwroot # Static files (Bootstrap, CSS, JS, images)
│
├── ContactsManager.ControllerTests # Unit tests for Controllers
│
├── ContactsManager.ServiceTests # Unit tests for Services
│
└── ContactsManager.IntegrationTests # Integration tests (end-to-end)
git clone https://github.com/your-username/ContactsManager.git
cd ContactsManagerModify appsettings.json inside ContactsManager.UI with your SQL Server connection string.
dotnet ef database update --project ContactsManager.Infrastructuredotnet run --project ContactsManager.UIOpen your browser at:
👉 https://localhost:5001