Welcome to the setup guide for this application! To ensure a smooth running experience, please follow these steps:
-
Select the Startup Project:
- Choose the
Multitenant.API
as the startup project.
- Choose the
-
Ensure .NET 7 is Installed:
- Make sure that .NET 7 is installed on your machine.
-
Update Local Database Connection:
- Update the Local DB connection in
appsettings.json
for Alpha & Beta Databases. - This application supports Hybrid Multitenancy, providing three databases: Alpha, Beta, and Shared.
- If a DB Connection is not provided for a specific tenant, the default one (Shared) will be used.
- Update the Local DB connection in
-
JWT Authentication Credentials:
- This application supports JWT Authentication. Use the following credentials to generate a token:
- Endpoint:
/api/Authentication/Authenticate
- Username: "admin"
- Password: "admin"
- Endpoint:
- This application supports JWT Authentication. Use the following credentials to generate a token:
-
Endpoint Access:
- Use any API platform such as "Postman" to send headers. Swagger is also implemented to list endpoints.
- Headers required:
- Header 'Tenant':
<Add Tenant Name - Alpha, Beta, Tom, Jerry>
- Authorization Type: Bearer Token
- Token:
<Generated from Authenticate endpoint as mentioned in step 4>
- Header 'Tenant':
-
Sample CURL Command (
/api/GetAll
Endpoint - GET):curl --location 'https://localhost:5001/api/GetAll' \ --header 'tenant: tom' \ --header 'Authorization: Bearer <Token>'
Feel free to reach out if you need any support. You can contact me at [email protected] or connect on LinkedIn.
Happy coding! 🚀