I have added the following line of code in the Startup.cs, as we have have in our models a table called Entity and it was a conflicting with the entity of asp.net zero model.
services.AddSwaggerGen(options =>
{
options.SwaggerDoc("v1", new Info { Title = "KYC API", Version = "v1" });
options.DocInclusionPredicate((docName, description) => true);
** options.CustomSchemaIds(x => x.FullName);
**
options.AddSecurityDefinition("Bearer", new BasicAuthScheme());
});
By doing that when i run nswag i get the following error.
ERROR in ./src/shared/service-proxies/service-proxies.ts Module parse failed: 'return' outside of function (666:0) You may need an appropriate loader to handle this file type. | 1; | OfOfAuditLogListDtoAndSharedAnd_0AndCulture = neutralAndPublicKeyToken = null >> _observableThrow(e); | return "1OfOfAuditLogListDtoAndSharedAnd_0AndCulture=neutralAndPublicKeyToken=null>><any>observableThrow(response);\n }));\n }\n\n protected processGetAuditLogs(response: HttpResponseBase): Observable<PagedResultDto"; | 1; | OfOfAuditLogListDtoAndSharedAnd_0AndCulture = neutralAndPublicKeyToken = null > {
Could you pleaset let me know how we should handle this?
public class TenantInitializerEventManager : IEventHandler<EntityCreatedEventData<Tenant>> { private readonly ITenantInitializerService tenantInitializerService;
public TenantInitializerEventManager(ITenantInitializerService tenantInitializerService)
{
this.tenantInitializerService = tenantInitializerService;
}
public void HandleEvent(EntityCreatedEventData<Tenant> eventData)
{
this.tenantInitializerService.CreateNewTenantSeedData(eventData.Entity);
}
}
I have created the below Event Manager, which is calling a method that contains the seed data that I wish to autopopulate the tenant upon creation.
public TenantInitializerEventManager(ITenantInitializerService tenantInitializerService)
{
this.tenantInitializerService = tenantInitializerService;
}
public void HandleEvent(EntityCreatedEventData<Tenant> eventData)
{
this.tenantInitializerService.CreateNewTenantSeedData(eventData.Entity);
}
This Event is not fired when a tenant is created, where do I declare to execute the Event?
Thank you for the answer.
Can we create the Event in the TenantAppService uder the followign method:
public async Task CreateTenant(CreateTenantInput input) {}
Or is there any better place to do it?
Hi again,
Since Tenant is already CRUDed by abp is there any event already implemented for this purpose when a tenant is created?
Thank you ismcagdas
Maybe I wasn't clear enough on my question.
I have created some settings i.e. Countries and I want each tenant to have full control over the Countries of their application.
I also want as soon as the Tenant is created, that I autopopulate a list of countries to start with, before the end user can perform CRUD operations on the Countries settings page.
How can I set a "signal" that as soon as tenant is created, it should autopopulate ot the the Countries Table linked with the Tenant's ID?
Hi,
I have created some settings for each tenant, that I wish to be autopopulated once a tenant is created.
How can I accomplish such functionality?
I have noticed that the TenantId is not set as a foreign key to any tables (i.e. organizationunits).
Is there a reason for not doing that?