Comments (3)
The TenantId
has actually not much to do with the Identity integration, but rather with the MultiTenancy integration. Although they do run a bit into each other.
The BaseDbContext
is derived from MultiTenantIdentityDbContext
, which is a type from the Finbuckle.MultiTenant library. It's that library that takes care of adding the TenantId
property to all the Multitenant entities (using a shadow property) and also takes care of setting that property when saving entities and generally guarding against cross-tenant data access (using global query filters).
So everything should be taken care of in the background... without it getting in the way of developers too much. The only thing to remember is specifying that your entity is a multitenant entity in its configuration (see how that's done for the brands and products).
We're definitely not manually generating the migration files ;-)
All the Identity entities are configured as multitenant, so yes querying these only works for the current tenant. There are some caveats to be aware of though, which is explained on their docs site.
from docs.
The
TenantId
has actually not much to do with the Identity integration, but rather with the MultiTenancy integration. Although they do run a bit into each other.The
BaseDbContext
is derived fromMultiTenantIdentityDbContext
, which is a type from the Finbuckle.MultiTenant library. It's that library that takes care of adding theTenantId
property to all the Multitenant entities (using a shadow property) and also takes care of setting that property when saving entities and generally guarding against cross-tenant data access (using global query filters).We're definitely not manually generating the migration files ;-)
All the Identity entities are registered as multitenant, so yes querying these only works for the current tenant. There are some caveats to be aware of though, which is explained on their docs site.
Thanks for the quick response! Didn't occur to me that you might have config files for entities. Will check that out and the package you mentioned. It seems great.
from docs.
@iammukeshm maybe turn this into a docs issue, so this information gets added to the documentation somehow ;-)
from docs.
Related Issues (8)
- Unable to create an object of type 'ApplicationDbContext' HOT 2
- Where is the "dotnet-webapi-boilerplate" repo? HOT 1
- Update NET 8 dotnet-webapi-boilerplate HOT 1
- [Documentation] Solution Structure / WebApi
- [Documentation] Update Documentation of Project Dependencies HOT 1
- Readme HOT 1
- [Documentation] Application project does not depend on any other project HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.