Skip to content

DotNet (.NET) Clean Architecture template for your clean projects.

Notifications You must be signed in to change notification settings

maulanaaghnii/dotnet-clean-architecture

Repository files navigation

Clean Architecture Project

This project is an implementation of the Clean Architecture pattern in .NET. It is designed to separate concerns across different layers, making the system more maintainable and testable.

Project Structure

  • CleanArchitecture.Application: Contains application logic and business rules.
  • CleanArchitecture.Domain: Contains domain entities and aggregates.
  • CleanArchitecture.Persistence: Manages data access and storage.
  • CleanArchitecture.WebAPI: Exposes the application functionality via RESTful APIs.
  • CleanArchitecture.UnitTest: Contains unit tests for the application.

Prerequisites

Getting Started

Clone the Repository

git clone https://github.com/your-repo/clean-architecture.git
cd clean-architecture

Restore Dependencies

dotnet restore

Build the Project

dotnet build

Run the Application

Navigate to the CleanArchitecture.WebAPI directory and run:

dotnet run

The application will start and be accessible at http://localhost:5000.

Running Migrations

To apply migrations, use the following command:

dotnet ef migrations add Initial --project CleanArchitecture.Persistence --startup-project CleanArchitecture.WebAPI
dotnet ef database update --project CleanArchitecture.Persistence --startup-project CleanArchitecture.WebAPI

Running Unit Tests

To execute the unit tests, run the following command in the root directory:

dotnet test

Contributing

Contributions are welcome! Please fork the repository and submit a pull request for review.

License

This project is licensed under the MIT License.

This project based on https://github.com/juldhais/CleanArchitecture

About

DotNet (.NET) Clean Architecture template for your clean projects.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published