Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

Entities with to multiple tenants #1885


User avatar
0
okeziestanley created

Hi guys , I have been using asp. net boilerplate for a while now and I think its simply the best. Recently I am building an app where an entity can belong to different tenants, but will have different data for those tenants, so instead of tenants creating the same entity they can just pick from the list or add new if not found. Thanks


1 Answer(s)
  • User Avatar
    0
    hikalkan created
    Support Team

    That's possible. Just don't implement IMayHaveTenant or IMustHaveTenant interface for the shared entity class. Then in your per-tenant entities, you can reference to that shared entity. But note that if you are using db per tenant, then you can not join two tables because shared entities stored in host database and tenant entities will be in a different db.