Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mcrio/Mcrio.Finbuckle.MultiTenant.RavenDb.Store
RavenDB implementations of the Finbuckle.MultiTenant store.
https://github.com/mcrio/Mcrio.Finbuckle.MultiTenant.RavenDb.Store
Last synced: about 2 months ago
JSON representation
RavenDB implementations of the Finbuckle.MultiTenant store.
- Host: GitHub
- URL: https://github.com/mcrio/Mcrio.Finbuckle.MultiTenant.RavenDb.Store
- Owner: mcrio
- License: mit
- Created: 2021-08-06T11:09:01.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2023-05-25T07:51:56.000Z (over 1 year ago)
- Last Synced: 2024-07-11T17:08:33.218Z (3 months ago)
- Language: C#
- Size: 101 KB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: License.md
Awesome Lists containing this project
README
# Finbuckle Multi-Tenant on RavenDB
[![Build status](https://dev.azure.com/midnight-creative/Mcrio.Finbuckle.MultiTenant.RavenDb.Store/_apis/build/status/Build)](https://dev.azure.com/midnight-creative/Mcrio.Finbuckle.MultiTenant.RavenDb.Store/_build/latest?definitionId=7)
![Nuget](https://img.shields.io/nuget/v/Mcrio.Finbuckle.MultiTenant.RavenDb.Store)RavenDB implementation of the Finbuckle.MultiTenant store.
#### What is Finbuckle Multi-Tenant
Finbuckle.MultiTenant is open source multi-tenancy middleware for .NET.
For more information about Finbuckle.MultiTenant visit the [official website](https://www.finbuckle.com).## Getting Started
### NuGet Package
Using the NuGet package manager install the [Mcrio.Finbuckle.Multitenant.RavenDb.Store](https://www.nuget.org/packages/Mcrio.Finbuckle.MultiTenant.RavenDb.Store) package, or add the following line to the .csproj file:
```xml
```
## Usage
Add the following lines to Startup.cs.
```c#
// ConfigureServices(...)
services
// adds finbuckle support as per official documentation
.AddMultiTenant()
// adds RavenDb store by providing Tenant info type and RavenDb store type.
// both can be extended to suit your requirements
.WithRavenDbStore>(
// define how IAsyncDocumentSession is resolved from DI
// as library does NOT directly inject IAsyncDocumentSession
provider => provider.GetRequiredService().Session
)
```### Custom Tenant info data
Extend `Finbuckle.MultiTenant.TenantInfo` or `Finbuckle.MultiTenant.ITenantInfo` and provide types when
adding Finbuckle.MultiTenant and the RavenDb store.### Paginated results
`FinbuckleRavenDbStore` implements `Mcrio.Finbuckle.MultiTenant.RavenDb.Store.Interfaces.IHavePaginatedMultiTenantStore`
which can be used to retrieve a paginated tenant list.### Compare Exchange key prefixes
Unique tenant identifiers are handled by the compare exchange.
Compare exchange key prefixes can be modified by following:
- Extend `FinbuckleRavenDbStore` and override `protected virtual CompareExchangeUtility CreateCompareExchangeUtility()` to return
an extended `CompareExchangeUtility` that will override the functionality for generating
compare exchange key prefixes. See `CompareExchangeUtility.GetKeyPrefix` for predefined compare exchange key prefixes.### ID generation
If using the provided `Finbuckle.MultiTenant.TenantInfo` class, `Id` can be changed after object construction.
By default set to `null` which implies HiLo identifier generation.
Refer to official [RavenDB document](https://ravendb.net/docs/article-page/5.2/working-with-document-identifiers/client-api/document-identifiers/working-with-document-identifiers) about identifier generation strategies.## Release History
- **1.0.0**
Stable version.## Meta
Nikola Josipović
This project is licensed under the MIT License. See [License.md](License.md) for more information.
## Do you like this library?
addr1q87dhpq4wkm5gucymxkwcatu2et5enl9z8dal4c0fj98fxznraxyxtx5lf597gunnxn3tewwr6x2y588ttdkdlgaz79spp3avz
0xae0B28c1fCb707e1908706aAd65156b61aC6Ff0A
bc1q3s8qjx59f4wu7tvz7qj9qx8w6ktcje5ktseq68