This is the backend part of a Todo application developed using .NET Core 5 and following the Clean Architecture methodology. The project utilizes SQL Server and Entity Framework. Follow the steps below to get started with the project.
- .NET 5 SDK
- SQL Server (local or remote)
The project follows the Clean Architecture methodology, where each of the following projects represents a different layer:
- Entities: Contains the database tables and data models.
- DataAccess: Contains the code for interacting with the database.
- Core: Contains common code for general use.
- Business: Contains the code implementing the business logic.
- API: Contains the code for the RESTful API.
- Clone the project to your local machine:
git clone https://github.com/hakannyucel/todo-backend.git
-
Create a new database in SQL Server.
-
Update the SQL Server connection string in the
appsettings.json
file:
"ConnectionStrings": {
"DefaultConnection": "Data Source=your_server;Initial Catalog=your_database;User ID=your_username;Password=your_password"
}
- Navigate to the project folder in the command line:
cd todo-backend
- Build the project:
dotnet build
- To create the database and add sample data, run the following commands sequentially:
dotnet ef database update --project DataAccess
- Start the project:
dotnet run --project API
- Open your browser and go to http://localhost:5000/swagger to access the Swagger interface and start using the API.
The project follows the Clean Architecture methodology, where each of the following projects represents a different layer:
- .NET 5
- SQL Server
- Entity Framework Core
- FluentValidation
- Autofac
- log4net
If you would like to contribute to the project, please follow the steps below:
- Fork the project to your own GitHub account.
- Create a new branch:
git checkout -b my-new-feature
- Make your desired changes and commit them:
git commit -am 'Add some feature'
- Push the branch to your fork:
git push origin my-new-feature
- Create a new pull request (PR) and initiate a discussion about your changes.