Introduction to near-product MVC Architecture-Multi-tenant mode, mvc tenant
The data section of an application supports multiple tenants. A tenant can be either a presentation area (PersentArea) or another application. The simplest way to design databases is to add TenantTypeId to the application data table (store the corresponding ApplicationId)
Multi-tenant technology is used to isolate application context isolation and data isolation between different tenants, so that applications between different tenants do not interfere with each other, at the same time, data confidentiality is strong enough.
When a program calls data, the data is filtered by the corresponding data table based on the tenant ID of the service to obtain the data.
For example, data of classification, comment, and tag will be filtered by tenant ID.
All these data have their own classification tables, comment tables, and label tables. There are more than one location for classification, comment, or tag.
For example, for photo albums, comments, and comments, how can we distinguish the three comments from a table?
That's the tenant ID.
A tenant ID is an identifier, and there are many services in the company framework. When an application calls data mining under a service, it needs to be obtained from the Service database based on the Application tenant ID.
Instance product based on asp.net mvc 5.0 framework, source code: http://www.jinhusns.com/Products/Download