-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsteps.txt
More file actions
70 lines (58 loc) · 2.89 KB
/
steps.txt
File metadata and controls
70 lines (58 loc) · 2.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
* commands to create the solution and projects:
dotnet new sln -n AuthService
dotnet new classlib -n AuthService.Domain -o AuthService.Domain
dotnet new classlib -n AuthService.Application -o AuthService.Application
dotnet new classlib -n AuthService.Infrastructure -o AuthService.Infrastructure
dotnet new webapi -n AuthService.API -o AuthService.API
* Add projects to the solution:
dotnet sln add AuthService.Domain/AuthService.Domain.csproj
dotnet sln add AuthService.Application/AuthService.Application.csproj
dotnet sln add AuthService.Infrastructure/AuthService.Infrastructure.csproj
dotnet sln add AuthService.API/AuthService.API.csproj
* Set up project references:
cd AuthService.API
dotnet add reference ../AuthService.Application/AuthService.Application.csproj ../AuthService.Infrastructure/AuthService.Infrastructure.csproj
cd ../AuthService.Application
dotnet add reference ../AuthService.Domain/AuthService.Domain.csproj
cd ../AuthService.Infrastructure
dotnet add reference ../AuthService.Domain/AuthService.Domain.csproj
cd ..
* Install initial NuGet packages for each project:
cd AuthService.Infrastructure
dotnet add package Microsoft.EntityFrameworkCore --version 8.0.0
dotnet add package Microsoft.EntityFrameworkCore.SqlServer --version 8.0.0
dotnet add package Microsoft.AspNetCore.Identity.EntityFrameworkCore --version 8.0.0
cd ../AuthService.API
dotnet add package Swashbuckle.AspNetCore --version 6.5.0
dotnet add package Microsoft.AspNetCore.Authentication.JwtBearer --version 8.0.0
cd ..
* Solution structure:
AuthService.sln
├── AuthService.Domain
│ └── AuthService.Domain.csproj
├── AuthService.Application
│ └── AuthService.Application.csproj
├── AuthService.Infrastructure
│ └── AuthService.Infrastructure.csproj
├── AuthService.API
│ └── AuthService.API.csproj
* Add identity package
cd AuthService.Domain
dotnet add package Microsoft.AspNetCore.Identity --version 2.3.1
dotnet add package Microsoft.AspNetCore.Identity.EntityFrameworkCore --version 8.0.0
cd ..
cd AuthService.Application
dotnet add package Microsoft.AspNetCore.Identity --version 2.3.1
dotnet add package Microsoft.IdentityModel.Tokens --version 8.12.1
dotnet add package System.IdentityModel.Tokens.Jwt --version 8.12.1
dotnet add package MailKit --version 4.12.1
cd ..
cd AuthService.API
dotnet add package Microsoft.AspNetCore.Identity.EntityFrameworkCore --version 8.0.0
dotnet add package Microsoft.EntityFrameworkCore.Design --version 8.0.0
dotnet add package Microsoft.AspNetCore.Authentication.JwtBearer --version 8.0.0
dotnet add package Swashbuckle.AspNetCore --version 6.5.0
cd ..
set <InvariantGlobalization>false</InvariantGlobalization> in AuthService.API.csproj
dotnet ef migrations add InitialCreate --project AuthService.Infrastructure --startup-project AuthService.API
dotnet ef database update --project AuthService.Infrastructure --startup-project AuthService.API