CustomerAPI is an ASP.NET API Core case solution create to implement a authorization pages using Json Web Token (JWT) and to demonstrate the behavior of a routes of method type GET with some filters using EF Core.
Model-View-Controller
Repository
Dependency Injection
Inversion of Control
Project | Application Layer |
---|---|
CustomerAPI.Application | User Interface Rest (controllers) |
CustomerAPI.Application.DTO | Models Views Using in project CustomerAPI.Application |
CustomerAPI.Core | Data Entities and Interfaces |
CustomerAPI.Infra.CrossCutting | Automapper and IoC |
CustomerAPI.Infra.Data | Data Context and Repositories |
CustomerAPI.Framework | Filters and Extensions |
Dependency | Version |
---|---|
.NET Core | 3.1 |
AutoMapper | 10.1.1 |
EntityFramework Core | 3.1.10 |
C# | 8 |
Microsoft VisualStudio Web CodeGeneration Design | 3.1.4 |
Swashbuckle AspNetCore Swagger | 5.6.3 |
SQL Server LocalDB | 2019 |
- Download or clone this repository.
- Open the solution in Visual Studio 2017 or higher.
- Select Customer.Application for Default Project.
- Run the application.
- If occors error after build project related of version of the database you have to update the SQL Server LocalDB for version 2018 or higher. Learn More
-
The project contains a configuration which may require modification for the developer's specific environment:
Project File CustomerWeb.Application appsettings.json CustomerWeb.Application appsettings.Development.json -
The configuration string specifies the target database server:
Server=(localdb)\\mssqllocaldb;AttachDbFilename=|DataDirectory|App_Data\\customerdb.mdf;Database=customerdb;
. Developers using a different target database will have to change the connection string.