KEMBAR78
Clean Architecture | PDF
0% found this document useful (0 votes)
10 views9 pages

Clean Architecture

Uploaded by

antony
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views9 pages

Clean Architecture

Uploaded by

antony
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Clean architecture in mvc and web api combine using dapper with folder structure

To combine Clean Architecture in both ASP.NET Core MVC and Web API using Dapper with a clean
and organized folder structure, the structure should reflect the separation of concerns. Here's how
you can structure the solution:

Solution Structure Overview

src/

|-- Presentation/

| |-- WebApi/

| | |-- Controllers/

| | |-- Models/

| | |-- Views/

| |-- MvcApp/

| |-- Controllers/

| |-- Models/

| |-- Views/

|-- Application/

| |-- DTOs/

| |-- Interfaces/

| |-- Services/

|-- Domain/

| |-- Entities/

| |-- Interfaces/

|-- Infrastructure/

| |-- Persistence/

| |-- Repositories/

| |-- Data/
|

tests/

|-- UnitTests/

| |-- Application/

| |-- Domain/

| |-- Infrastructure/
Summary

This folder structure respects Clean Architecture principles by separating each layer (Presentation,
Application, Domain, Infrastructure) while also allowing for flexibility in how both MVC and Web API
applications are developed. Both projects can leverage the same business logic and data access
code, while being decoupled from specific implementation details like Dapper.

You might also like