Step 1: You can find the below files once you extract the downloaded file.
Step 2: Open the project by double clicking on NETAdminLTEWeb.sln file
Step 3: Once it opens you can see these projects in Visual Studio 2022
Step 1: Click and expand NETAdminLTEWeb and open appsettings.json file to change the db connection string.
Step 2: Now we'll change the connection string in the API project. To do that click and expand the NETAdminLTEApi project and open appsettings.json and paste the same connection string here.
Note: If you want to change the JWT Secret key change the
"Secret"value with your own
To create a migration file by using Package Manager Console and apply it to the database follow these steps
Step 1: Select Tools -> Nuget Package manager -> Package Manager Console this will open the Package Manager console.
Step 2: Click on the default project dropdown and choose AdminLTEDataAccess for running the migration command
Step 3: Type this command to generate the migration script
Step 4: Once it successfully generates the migration fine you can see this output and a folder in the NETAdminLTEDataAccess project
Step 5: Then run this command to run the migration script to create the database and its table
Step 6: Once it successfully updates you can see this output and also the database will be created in MSSql Server
You can use SQL Management Studio to make sure that the database is created
Step 1: To run the project for the first time select the highlighted option.
Step 2: Once it launches a browser will open and you can see this login page
Step 1: To seed the demo data. Click on the Seed demo data button. Once it's done you can see this success message.
Step 1: To login with the default admin credential. Use below credentials
UserName: adminuserPassword: Admin@123
Step 2: Once you login you can see the dashboard
Step 1: To run the API project select the NETAdminLTEApi from the project selection dropdown
Step 2: Click on the run button (IIS Express) to launch the API project
This will launch the API project with swagger UI in your default browser for testing the endpoints
Step 3: Once it successfully launches you can see this screen
Here we're testing the end points using the build in swagger UI, you can use any API testing tools (ex: postman).
Step 1: To try the login method to get the JWT token and user data. Click on the /api/v1/login to expand it.
Step 2: Click on the Try it out button to try the API
Step 3: Now, fill in the be below mentioned demo credentials for login
userName: appuserpassword: User@123
Step 4: Once it's successful, you can see the response like this
That's all you're good to start your awesome project. Happy coding