0
amer_op created
hello , i have a class in the web.host project, and i need to accsess the TenantId in my class , what is the best practice to injecte AbpSession object in the class constructor ?
Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)
4 Answer(s)
-
0
You can take a look at the abp documentation. https://aspnetboilerplate.com/Pages/Documents/Abp-Session
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
maliming thank you.
but how to inject it ? i mean suppose this ->
public myclass(IAbpSession _AbpSession) { this.AbpSession = _AbpSession; }
new myclass(what to do here ?);
do i have to use IOC manager ? or what ?
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
Yes, you should use IOC everywhere. For more framework information, please see related documents https://aspnetboilerplate.com/Pages/Documents/Dependency-Injection
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image) -
0
This issue is closed because it has not had recent activity for a long time.
Markdown is supportedCopy & paste or drag & drop images (max 30 MB per image)