0
Sergei.Gorlovetsky created
Hello,
I have used this method (https://docs.abp.io/en/abp/latest/Object-Extensions#object-extension-manager) to extend Saas.Tenants
I have BlobConnectionString as new column in Saas.Tenants Table. I am wondering, how can I add that extra property in the API call while creating a new tenant ?
I tried to add that under extraproperties
in the JSON body, but that did not help.
End point : /api/saas/tenants
{
"extraProperties": {
"blobConnectionString" : "abc"
},
"name": "tenant7",
"editionId": null,
"adminEmailAddress": "tenant3@mellowoodmedical.com",
"adminPassword": "Test@123",
"activationState": 0,
"activationEndDate": "",
"connectionStrings": {
"id": "",
"default": null,
"databases": []
}
}
1 Answer(s)
-
1
Hi,
First, you need to configure the module entity extension.
https://docs.abp.io/en/abp/latest/Module-Entity-Extensions#quick-example
For example:
public static void ConfigureExtraProperties() { OneTimeRunner.Run(() => { ObjectExtensionManager.Instance.Modules() .ConfigureSaas(saas => { saas.ConfigureTenant(tenant => { user.AddOrUpdateProperty<string>( //property type: string "BlobConnectionString", //property name property => { //...other configurations for this property } ); }); }); }); }