GithubHelp home page GithubHelp logo

Comments (3)

fretje avatar fretje commented on July 19, 2024 1

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.

HybridSolutions avatar HybridSolutions commented on July 19, 2024

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).

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.

fretje avatar fretje commented on July 19, 2024

@iammukeshm maybe turn this into a docs issue, so this information gets added to the documentation somehow ;-)

from docs.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.