Angular7NetCoreStore is a sample application using Angular7 at front-end, .NET Core 2.1 at back-end and SQL Server as database.
The goal of this project is to share knowledge with the technical community and work on some patterns, good practices and new technologies.
- Full architecture with responsibility separation concerns, SOLID and Clean Code
- Domain Driven Design (Layers and Domain Model Pattern)
- Repository pattern
- .NET Core 2.2
- Entity Framework Core 2.2
- AspNetCore Identity
- C# 7.3
- ValueInjecter
- FluentValidation
- Angular 7.2
- Typescript 3.2
- HTML
- CSS
- SASS
- JWT
- Clean Code
- SOLID Principles
- DDD (Domain-Driven Design)
- Commands and Handlers
- Inversion of Control
- Repository Pattern
- Database Migrations
- Authentication
- Auhorization
After cloning or downloading the project you should be able to run it as soon as you configure the SQL Connection string and generate the database.
-
In your SQL Server create an empty database called AngularNetCoreStoreDB
-
Open the
appsettings.json
inAngular7NetCoreStore.WebAPI
and change the DefaultConnection to match with your SQL Server configuration
Now you need to generate the Domain and Identity tables.
-
Set
Angular7NetCoreStore.WebAPI
as Startup Project and make sure that the connection string is correct. -
Open your
Package Manager Console
, setAngular7NetCoreStore.Infra.Data
as Default project and run the following command:
Update-Database -Verbose -Context Angular7NetCoreStoreContext
- Now set
Angular7NetCoreStore.Infra.CrossCutting.Identity
as the Default project and run the command:
Update-Database -Verbose -Context ApplicationDbContext
If everything was right you have the tables created successfully.
-
On Visual Studio 2017, run the project
Angular7NetCoreStore.WebAPI
. -
On VSCode, open the folder
Angular7NetCoreStoreApp
, then open your command prompt under this folder and run
npm install
- After install all Angular dependencies, run the command:
ng serve -o
And the project should be running for you test the features.