Hello,
We've created a WPF application that uses the dynamic C# API client proxies. It consumes the HttpApi.Client module of our project. We basically want to set the tenant name while the request is being sent to do operations according to the tenant and expect it from the users with an input field. How can I set the tenant name while using the dynamic C# API client proxies?
- ABP Framework version: v5.3.3
- UI type: MVC
- DB provider: EF Core
- Tiered (MVC): yes
- Exception message and stack trace:
- Steps to reproduce the issue:"
3 Answer(s)
-
0
hi
How can I set the tenant name while using the dynamic C# API client proxies?
You can change the current tenant
using (_currentTenant.Change(tenantId)) { return await _dynamicProductService.GetListAsync(); }
-
0
Is there a way to do it with the tenant name like passing the __tenant value in the header values?
-
0
No, It will set
Tenant.Id
by default.https://github.com/abpframework/abp/blob/dev/framework/src/Volo.Abp.Http.Client/Volo/Abp/Http/Client/ClientProxying/ClientProxyBase.cs#L296