Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Options builder support (#672) #681

Merged
merged 10 commits into from Mar 17, 2024
Merged

Conversation

AndrewTriesToCode
Copy link
Sponsor Contributor

  • Implement support for OptionsBuilder

  • Reverted changes to TenantConfigureNamedOptions

  • Restored commented test

  • Removed dependencies


@AndrewTriesToCode AndrewTriesToCode deleted the feat/better-per-tenant-options branch November 14, 2023 01:05
@AndrewTriesToCode AndrewTriesToCode restored the feat/better-per-tenant-options branch November 14, 2023 01:06
* Implement support for OptionsBuilder

* Reverted changes to TenantConfigureNamedOptions

* Restored commented test

* Removed dependencies

---------

Co-authored-by: Sam Goldmann <sam.goldmann@gmail.com>
@AndrewTriesToCode
Copy link
Sponsor Contributor Author

rebasing

@AndrewTriesToCode
Copy link
Sponsor Contributor Author

Ok @goldsam sorry for the delay. I'm active on this again. Thanks for the head start. I am going to make a few design changes but I really like the options wrapper -- I think I won't need a custom options factory anymore with this. I also like your Options Builder related code. I will probably slightly reformat some method names.

I am going to deprecate WithPerTenantOptions on MultiTenantBuilder in favor of ConfigurePerTenant variants directly on IServiceCollection. I hope to get this out soon. I won't be able to work on it really over Thanksgiving week so I will try to get it there this week. That will make Finbuckle Options very aligned with the vanilla ones in terms of naming and use for regular options and options builder with DI.

Thanks again.

@goldsam
Copy link

goldsam commented Nov 16, 2023

@AndrewTriesToCode Thank you so much! Glad my contribution was welcome.

@mikecowgill
Copy link

I'm looking forward to switching to the ConfigurePerTenant method. I have a use case that depends on being able to add the options conditionally, outside of the .AddMultiTenant configuration. This PR looks to help achieve that nicely.

@AndrewTriesToCode
Copy link
Sponsor Contributor Author

Glad to hear it will help you. I’m on vacation this week but will prioritize it shortly. I still need to update the docs to reflect the changes and consider tests.

@goldsam
Copy link

goldsam commented Feb 28, 2024

It looks like you're closing in on the finish line 🥳🎉

@AndrewTriesToCode
Copy link
Sponsor Contributor Author

Getting there. I apologize for the slow cadence. I’m going to lump in a few other breaking changes and get this out in March.

@AndrewTriesToCode AndrewTriesToCode merged commit 1859017 into main Mar 17, 2024
10 checks passed
@AndrewTriesToCode AndrewTriesToCode deleted the feat/better-per-tenant-options branch April 21, 2024 20:26
github-actions bot pushed a commit that referenced this pull request Apr 21, 2024
## [7.0.0](v6.13.1...v7.0.0) (2024-04-21)

### ⚠ BREAKING CHANGES

* Many namespaces have been updated for consistency. Most code will only need to reference the `Finbuckle.MultiTenant` namespace.
* Connection string is removed because in many cases it is not needed. Closes #624
* all unique indexes and the UserLogin primary key in the standard Identity models are adjusted to include the tenant id
* (I)MultiTenantContext and (I)TenantInfo are no longer available via DI. Use IMultiTenantContextAccessor instead. Also IMultiTenantContext nullability reworked and should never be null.
* WithPerTenantOptions replaced by ConfigurePerTenant service collection extensions methods.

Added support for `OptionsBuilder` API and more efficient per-tenant options overall.

### Features

* better options support ([#681](#681)) ([1859017](1859017))
* change default MultiTenantIdentityDbContext default index and key behavior ([81f5612](81f5612))
* MultiTenantDbContext and MultiTenantIdentityDbContext support for IMultiTenantContextAccessor DI ([9015085](9015085))
* namespace cleaned up ([b354838](b354838))
* refactor DI and improve nullability ([eca24bf](eca24bf))
* remove ConnectionString from ITenantInfo and TenantInfo ([f4e20db](f4e20db))

### Bug Fixes

* AdjustKey correctly adding TenantId to primary and foreign keys ([613b4a8](613b4a8))
@AndrewTriesToCode
Copy link
Sponsor Contributor Author

🎉 This PR is included in version 7.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

None yet

3 participants