IMultiTenancyApplicationBuilder.WithSharedBusinessObjects(Type[]) Method
Registers the specified host business object types as shared data accessible to tenants.
Namespace: DevExpress.ExpressApp.MultiTenancy.Xpo
Assembly: DevExpress.ExpressApp.MultiTenancy.Xpo.v25.1.dll
NuGet Package: DevExpress.ExpressApp.MultiTenancy.XPO
Declaration
Parameters
Name | Type | Description |
---|---|---|
types | Type[] | The types to share. |
Returns
Type | Description |
---|---|
IMultiTenancyApplicationBuilder | The application builder that processed the action. |
Remarks
In multi-tenant applications, the host database can maintain shared business objects. Call the WithSharedBusinessObjects
method to register the specified host business object types as shared data.
public class Startup {
public void ConfigureServices(IServiceCollection services) {
// ...
builder.AddMultiTenancy()
.WithSharedBusinessObjects(typeof(SharedEntityType1), typeof(SharedEntityType2), ...)
// ...
}
}
Note
- Data types associated with shared types must also be registered as shared types. Otherwise, access to associated objects is denied.
- If an application uses middle-tier security, the shared data types should be registered on the server and client side.
Refer to the following help topic for details on how to access shared business objects from a tenant: Shared Data Support in a Multi-Tenant Application.
See Also