carlosza
carlosza

Reputation: 375

Is there a way to create a CRUD as multi-tenancy in ABP.io?

I want to create a CRUD using the class CrudAppService<TEntity, TEntityDto, TKey> but my entity is a IMultiTenant. Is there a way it can automatically add this tenant id for me or do I have to overwrite the default CRUD?

Upvotes: 1

Views: 353

Answers (1)

enisn
enisn

Reputation: 745

At this line AbstractKeyCrudAppService.cs#L91

CrudAppService tries to set TenantId from CurrentTenant. So, If you create a tenant and switch to it, TenantId will be set automatically.

Upvotes: 3

Related Questions