Build your first project
-
Create a project "MyFirstProject" with company name "MyCompany" using the BIAToolKit in folder "C:\Sources\Test". Step describe here. If you have company files used them to have correct settings.
-
Open the folder "C:\Sources\Test\MyFirstProject"
-
Open with Visual Studio 2022 the solution "C:\Sources\Test\MyFirstProject\DotNet\MyFirstProject.sln"
-
ONLY If you have not company files containing configuration files
-
In project MyCompany.MyFirstProject.DeployDB rename files
- appsettings.Example_Development.json => appsettings.Development.json
-
In project MyCompany.MyFirstProject.Presentation.Api rename files
- appsettings.Example_Development.json => appsettings.Development.json
- bianetconfig.Example_Development.json => bianetconfig.Development.json
- in bianetconfig.Development.json, in LdapDomains section enter the short name and long name of your domain : Replace DOMAIN_BIA_1 by the short name and the-user-domain1-name.bia by the long name.
-
In project MyCompany.MyFirstProject.WorkerService rename files
- appsettings.Example_Development.json => appsettings.Development.json
- bianetconfig.Example_Development.json => bianetconfig.Development.json
-
-
Open Sql Server Management Studio and create a database named "MyFirstProject"
-
Launch the Package Manager Console in VS 2022 (Tools > Nuget Package Manager > Package Manager Console).
-
Be sure to have the project MyCompany.MyFirstProject.Infrastructure.Data selected as the Default Project in the console and the project MyCompany.MyFirstProject.Presentation.Api as the Startup Project of your solution.
-
In the package manager console, run the Add-Migration command to initialize the migrations for the database project.
- Run the command:
Add-Migration Init -Context "DataContext"
- Console must display no error message
- Verify new file 'Init' is created:
- Run the command:
-
In the package manager console, run the Update-Database command to create tables in the database .
- Run the command:
Update-Database -Context "DataContext"
- Console must display no error message
- Verify tables are created in the database:
- Run the command:
-
Be sure startup project is "MyCompany.MyFirstProject.Presentation.Api".
Run it. -
The swagger page will be open.
Click on "BIA login" at bottom right.
The button will be green.
-
If the button is red it is probably an error in bianetconfig.Example_Development.json. Ensure to have valid LDAP domain specified.
-
Run VS code and open the folder "C:\Sources\Test\MyFirstProject"
-
Open a new terminal (Terminal > New Terminal) and enter the command:
cd .\Angular\
npm install
npm start -
Open a browser at address http://localhost:4200/ (IIS express in Visual studio should be always running)