A simple blog for learn-by-doing
Show the README.md in DBScript folder.
Set your dbtype and connection string in files appsettings.json (or better in appsettings.Development.json) - replace DB_TYPE and YOUR_CONNECTION_STRING with your connection string
Possible dbtype:
- "MsSQL" (default)
- "MySQL"
{
"DatabaseType": "DB_TYPE"
"ConnectionStrings": {
"myBlog": "YOUR_CONNECTION_STRING"
}
}
- For the Web Application set Magicianred.LearnByDoing.MyBlog.Web project as Startup Project and lanch debug or see the README.md
- For the Web Api Application set Magicianred.LearnByDoing.MyBlog.WebApi project as Startup Project and lanch debug or see the README.md
This project contains the project infrastructure with all models and interfaces that used in the project.
All projects references this project, but this project have no references to other projects.
The DAL project is the project that handle the communication with the database, retrieve data and insert, edit or delete these.
The project use Dapper for communicate with the database.
The BL project is concerned with the business logic of the application.
It use the Domain project and the DAL project in order to handle data and manipulate it to produce the features that the application will do.
This is the web application. It is concerned with display data to the visitator of the web site.
This is the web api application. It is concerned with retrieve json data.
Usually a web api project is consumed not by human but by other applications, specially client applications like react, angular or other javascript frameworks/libraries, but also client applications like WPF or other MVC and web api.
There are two types of tests:
- Unit tests: there are test make in isolation (for example without a database) throws dependency inject and mocks objects.
- Integration tests: there are test make, respect to unit tests, with real objects (for example with a real database create for the test, not with the production database!)
This is the project with Unit Tests for the DAL project.
This is the project with Unit Tests for the BL project.
This is the project with Integration Tests for the Web project.
This is the project with Integration Tests for the WebApi project.