-
Notifications
You must be signed in to change notification settings - Fork 1
/
netcreator_NET.cmd
67 lines (44 loc) · 1.79 KB
/
netcreator_NET.cmd
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
67
:: netcreator_NET.cmd myProject net9.0
@echo off
:: -----------------------
SET filepath=%1
SET framework=%2
:: -----------------------
IF "%filepath%" == "" set filePath=test
IF "%framework%" == "" set framework=net9.0
mkdir %filepath%
cd %filepath%
REM CORE ##########################
dotnet new classlib -f %framework% -o %filepath%.Core
cd %filepath%.Core & del Class1.cs
mkdir Data & mkdir DataAccess & mkdir Utilities
dotnet add package MySql.EntityFrameworkCore
cd ..
REM DATA ##########################
dotnet new classlib -f %framework% -o %filepath%.Data
cd %filepath%.Data & del Class1.cs
mkdir Entities & mkdir Dtos & mkdir Utilities
dotnet add package MySql.EntityFrameworkCore
dotnet add package Microsoft.EntityFrameworkCore.Tools
cd ..
REM DATA-ACCESS ####################
dotnet new classlib -f %framework% -o %filepath%.DataAccess
cd %filepath%.DataAccess & del Class1.cs
mkdir Abstract & mkdir Concrete
dotnet add package Microsoft.EntityFrameworkCore
cd ..
REM WEB-API ########################
dotnet new webapi -f %framework% -o %filepath%.WebAPI
cd %filepath%.WebAPI
dotnet add package MySql.EntityFrameworkCore
cd ..
REM REFERENCES #####################
dotnet add %filepath%.Data/%filepath%.Data.csproj reference %filepath%.Core/%filepath%.Core.csproj
dotnet add %filepath%.DataAccess reference %filepath%.Data/%filepath%.Data.csproj %filepath%.Core/%filepath%.Core.csproj
dotnet add %filepath%.WebAPI reference %filepath%.DataAccess %filepath%.Data/%filepath%.Data.csproj %filepath%.Core/%filepath%.Core.csproj
REM SOLUTION #######################
dotnet new sln --name %filepath%
dotnet sln %filepath%.sln add %filepath%.Core %filepath%.Data/%filepath%.Data.csproj %filepath%.DataAccess %filepath%.WebAPI
cd ..
REM STARTUP #######################
start %filepath%\%filepath%.sln