Search This Blog

Thursday, September 18, 2025

CleanArchitecture

 SchoolSystemSolution 

├──  <<projectname>>.Domain                 // Enterprise business rules.  Class Library project

│   ├── Entities

│   │   ├── Student.cs

│   │   ├── Teacher.cs

│   │   └── Admin.cs

│   └── ValueObjects (if needed)

├──  <<projectname>>.Application            // Application business rules. Class Library project

│   ├── DTOs

│   │   ├── StudentDto.cs

│   │   ├── TeacherDto.cs

│   │   └── AdminDto.cs

│   ├── Interfaces

│   │   ├── IStudentRepository.cs

│   │   ├── ITeacherRepository.cs

│   │   └── IAdminRepository.cs

│   ├── Services (or UseCases)

│   │   ├── StudentService.cs

│   │   ├── TeacherService.cs

│   │   └── AdminService.cs

│   └── Mapping (optional: AutoMapper profiles)

├──  <<projectname>>.Infrastructure      // External concerns (EF, Repositories, etc.)

│   ├── Data                                            //Class Library project

│   │   └──  <<projectname>>DbContext.cs

│   ├── Repositories

│   │   ├── StudentRepository.cs   // implements IStudentRepository

│   │   ├── TeacherRepository.cs

│   │   └── AdminRepository.cs

│   └── Migrations

└──  <<projectname>>.Api                    // Framework/UI layer. WebAPI project

    ├── Controllers

    │   ├── StudentController.cs

    │   ├── TeacherController.cs

    │   └── AdminController.cs

    ├── Program.cs

    ├── appsettings.json

    └── Startup.cs (if not using minimal APIs)


No comments:

Post a Comment

Q36-Q40(EF)

Q36.  What is the difference between Include and Join in entity framework? Q37. What will be your approach in case you want to call a manual...