Closed shreya-groot closed 3 years ago
hi @shreya-groot
I agree the sample isn't a good as it could be -- it tries to show a few different things.
Let me ask you a few questions and I'll give you some specific advice:
Any other specific problems you are running into?
Hello Andrew, I am having problem to implement Finbuckle as I am having following specifications in it:
Please guide me Thanks & Regards Shreya
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10
From: Andrew @.> Sent: 20 April 2021 08:55 To: @.> Cc: @.>; @.> Subject: Re: [Finbuckle/Finbuckle.MultiTenant] How to use Finbuckle with Identity and EntityFramework in Asp.net (#418)
hi @shreya-groothttps://github.com/shreya-groot
I agree the sample isn't a good as it could be -- it tries to show a few different things.
Let me ask you a few questions and I'll give you some specific advice:
Any other specific problems you are running into?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Finbuckle/Finbuckle.MultiTenant/issues/418#issuecomment-822944988, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASHXH4YVWH4LCXRB6L476LDTJTXY7ANCNFSM43CQO4OQ.
@shreya-groot
in your app how do you detect the tenant? Does each tenant have a different url or hostname or do you do something completely different?
Before getting into the Identity MultiTenant Sample do you understand these samples?
RouteStrategySample
DataIsolationSample
(not the Identity one -- this one shows the basics that Identity builds on)Actually I am allowing the user to login and I will use his AspNetUserId from that which I assume to be same as tenant id which has been inserted in tenant table while registering the user
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10
From: Andrew @.> Sent: 20 April 2021 09:23 To: @.> Cc: @.>; @.> Subject: Re: [Finbuckle/Finbuckle.MultiTenant] How to use Finbuckle with Identity and EntityFramework in Asp.net (#418)
@shreya-groothttps://github.com/shreya-groot
in your app how do you detect the tenant? Does each tenant have a different url or hostname or do you do something completely different?
Before getting into the Identity MultiTenant Sample do you understand these samples?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Finbuckle/Finbuckle.MultiTenant/issues/418#issuecomment-822953789, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASHXH445IRYIAQ2AHUFBF7LTJT3DPANCNFSM43CQO4OQ.
And Also I don’t want to put tenant configuration in appSetting.json file as done in these two strategies
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10
From: Andrew @.> Sent: 20 April 2021 09:23 To: @.> Cc: @.>; @.> Subject: Re: [Finbuckle/Finbuckle.MultiTenant] How to use Finbuckle with Identity and EntityFramework in Asp.net (#418)
@shreya-groothttps://github.com/shreya-groot
in your app how do you detect the tenant? Does each tenant have a different url or hostname or do you do something completely different?
Before getting into the Identity MultiTenant Sample do you understand these samples?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Finbuckle/Finbuckle.MultiTenant/issues/418#issuecomment-822953789, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASHXH445IRYIAQ2AHUFBF7LTJT3DPANCNFSM43CQO4OQ.
Please help me to create a Tenant when I am using Identity to let the user login inside my ASP.Net Core app
@shreya-groot I'm sorry for the slow responses
You want to create a a tenant when a new user registers? Will your tenants have multiple users or will it be one user per one tenant?
You can create a new tenant by using the IMultiTenantStore<T>.TryAddAsync
method which requires a TenantInfo
object of type T
. Not all of the stores implement this method though so you might have to create your own store.
Then when you need to create a new tenant you just create a new tenant object instance as required then call the TryAddAsync
method on your IMultiTenantStore<T>
store instance which you can get the store from the DI system in most cases.
My tenant will have multiple users further. First of all I want to know which strategy I should use out of so many as I only want to create Tenant with so many users under him
In Asp.net core I have created all the users who can sign in into my application, but I want to make them specific to tenant, means I want to associate one tenant with each user without working on any routing.
please give me some example relateed to that.
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows 10
From: Andrew @.> Sent: 28 April 2021 08:43 To: @.> Cc: @.>; @.> Subject: Re: [Finbuckle/Finbuckle.MultiTenant] How to use Finbuckle with Identity and EntityFramework in Asp.net (#418)
@shreya-groothttps://github.com/shreya-groot I'm sorry for the slow responses
You want to create a a tenant when a new user registers? Will your tenants have multiple users or will it be one user per one tenant?
You can create a new tenant by using the IMultiTenantStore
Then when you need to create a new tenant you just create a new tenant object instance as required then call the TryAddAsync method on your IMultiTenantStore
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/Finbuckle/Finbuckle.MultiTenant/issues/418#issuecomment-828109651, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASHXH45KYFFAMHPQM5NEZQTTK54OHANCNFSM43CQO4OQ.
@shreya-groot it sounds like you are not using isolated Identity databases for each tenant and prefer to have a single Identity database where the tenant is associated with each user. In that case take a look at the "Shared Login" sample. It is ASP.NET 2.1 but the basic idea should still work. It will have a user login, check which tenant that user is, then use that tenant for all requests for that authorized user. No route or anything like that is needed.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
@shreya-groot I too have similar requirement .. did you got any solution for it ?
It would be really helpful to see and end to end solution. I keep seeing this question and none of the threads seem to resolve.
I have same requirements :) Would love to see some solutions for this :)
Please provide some example to do this as I am finding this doc at this url: https://github.com/Finbuckle/Finbuckle.MultiTenant/tree/main/samples/ASP.NET%20Core%203/IdentityDataIsolationSample
quite messy.
please help