Oh yes that makes complete sense. One of those duh moments. Thank you
I have no problem with ng-repeat. I just am such a newbie to Angular I don't really know all the ways to use it. Also I am not sure how to submit the collection with the rest of the form into my service endpoint. Any pointers on that?
I finally figured this out. I finally realized I needed to put the tentantId within the query. My bad.
var renterOrgUnit = await _organizationUnitRepository.FirstOrDefaultAsync(o => o.TenantId == renter.TenantId && o.DisplayName.Equals("Renter"));
I can save the user roll just fine. But the OU isn't working. This below line is bringing back an Id of 3864 but the Id of the OU should be 2. So it throws an exception when it tries to save the to the link between the OU and the user because it can't find that ID.
var renterOrgUnit = _organizationUnitRepository.FirstOrDefaultAsync(o => o.DisplayName.Equals("Renter"));
Oh yes you are correct. Thank you
I created my Table per hierarchy type of user and named it Renter. Which worked just fine. It automatically created a column in the DB called Discriminator.
My issue is now when I am creating my service I am having issues querying the DB. At first I tried doing something similar to this
private readonly IRepository<Renter> _renterRepository;
But it states that Authorization.User.Renter.Renter cannot be used as type parameter TEntity. So I was going to try and use the UserManager like how you do in the UserAppService
var query = UserManager.Users
.Include(u => u.Roles)
But I am unsure how I can just grab the Renters based off of the Discriminator column that entity framework created. Do you have any ideas?
I don't fully understand your first point to not add foreign key TenantId property because then it sounds like I should for point 2 and 3. I think the reason it doesn't. make much sense is because I never understood the benefits of having the tenant data in separate databases. That is for sure over my head as Multi-tenancy is so new to me.
2 and 3 make perfect sense to me. 3 fits my scenario the best. I am going to switch to IMustHaveTenant.
The reason is as we are in Alpha testing and through Beta testing, this app is actually going to be more of a single tenant app and Multi-tenancy will be turned off. But I want to design the system to support Multi-tenancy so in the future once we have ironed out all the bugs and quirks of the system we will be opening it up to multi-tenancy. So I have to be careful how I design it.
Perfect thank you. I did figure out to create a second Edition named Professional and then I gave the Chat feature the ID for that Edition and that worked as well. That way when we are ready to incorporate the Chat feature back it will be super easy to do so.
Again thank you
What do you mean by Seed method?
Just through the Database should work. Thank you
Will this work for Single tenant mode? I didn't realize you can login as host user for a single tenant mode.