Class TenantController
Implements
Inherited Members
Namespace: Volo.Saas.Host
Assembly: Volo.Saas.Host.HttpApi.dll
Syntax
[Controller]
[RemoteService(true, Name = "SaasHost")]
[Area("saas")]
[Route("/api/saas/tenants")]
public class TenantController : AbpControllerBase, IAvoidDuplicateCrossCuttingConcerns, ITenantAppService, ICrudAppService<SaasTenantDto, Guid, GetTenantsInput, SaasTenantCreateDto, SaasTenantUpdateDto>, ICrudAppService<SaasTenantDto, SaasTenantDto, Guid, GetTenantsInput, SaasTenantCreateDto, SaasTenantUpdateDto>, IReadOnlyAppService<SaasTenantDto, SaasTenantDto, Guid, GetTenantsInput>, ICreateUpdateAppService<SaasTenantDto, Guid, SaasTenantCreateDto, SaasTenantUpdateDto>, ICreateAppService<SaasTenantDto, SaasTenantCreateDto>, IUpdateAppService<SaasTenantDto, Guid, SaasTenantUpdateDto>, IDeleteAppService<Guid>, IApplicationService, IRemoteService
Constructors
TenantController(ITenantAppService)
Declaration
public TenantController(ITenantAppService service)
Parameters
Type | Name | Description |
---|---|---|
ITenantAppService | service |
Properties
Service
Declaration
protected ITenantAppService Service { get; }
Property Value
Type | Description |
---|---|
ITenantAppService |
Methods
ApplyDatabaseMigrationsAsync(Guid)
Declaration
[HttpPost]
[Route("{id}/apply-database-migrations")]
public Task ApplyDatabaseMigrationsAsync(Guid id)
Parameters
Type | Name | Description |
---|---|---|
Guid | id |
Returns
Type | Description |
---|---|
Task |
CheckConnectionStringAsync(string)
Declaration
[HttpGet]
[Route("check-connection-string")]
public Task<bool> CheckConnectionStringAsync(string connectionString)
Parameters
Type | Name | Description |
---|---|---|
string | connectionString |
Returns
Type | Description |
---|---|
Task<bool> |
CreateAsync(SaasTenantCreateDto)
Declaration
[HttpPost]
public virtual Task<SaasTenantDto> CreateAsync(SaasTenantCreateDto input)
Parameters
Type | Name | Description |
---|---|---|
SaasTenantCreateDto | input |
Returns
Type | Description |
---|---|
Task<SaasTenantDto> |
DeleteAsync(Guid)
Declaration
[HttpDelete]
[Route("{id}")]
public virtual Task DeleteAsync(Guid id)
Parameters
Type | Name | Description |
---|---|---|
Guid | id |
Returns
Type | Description |
---|---|
Task |
GetAsync(Guid)
Declaration
[HttpGet]
[Route("{id}")]
public virtual Task<SaasTenantDto> GetAsync(Guid id)
Parameters
Type | Name | Description |
---|---|---|
Guid | id |
Returns
Type | Description |
---|---|
Task<SaasTenantDto> |
GetConnectionStringsAsync(Guid)
Declaration
[HttpGet]
[Route("{id}/connection-strings")]
public Task<SaasTenantConnectionStringsDto> GetConnectionStringsAsync(Guid id)
Parameters
Type | Name | Description |
---|---|---|
Guid | id |
Returns
Type | Description |
---|---|
Task<SaasTenantConnectionStringsDto> |
GetDatabasesAsync()
Declaration
[HttpGet]
[Route("databases")]
public Task<SaasTenantDatabasesDto> GetDatabasesAsync()
Returns
Type | Description |
---|---|
Task<SaasTenantDatabasesDto> |
GetEditionLookupAsync()
Declaration
[HttpGet]
[Route("lookup/editions")]
public Task<List<EditionLookupDto>> GetEditionLookupAsync()
Returns
Type | Description |
---|---|
Task<List<EditionLookupDto>> |
GetListAsync(GetTenantsInput)
Declaration
[HttpGet]
public virtual Task<PagedResultDto<SaasTenantDto>> GetListAsync(GetTenantsInput input)
Parameters
Type | Name | Description |
---|---|---|
GetTenantsInput | input |
Returns
Type | Description |
---|---|
Task<PagedResultDto<SaasTenantDto>> |
SetPasswordAsync(Guid, SaasTenantSetPasswordDto)
Declaration
[HttpPut]
[Route("{id}/set-password")]
public Task SetPasswordAsync(Guid id, SaasTenantSetPasswordDto input)
Parameters
Type | Name | Description |
---|---|---|
Guid | id | |
SaasTenantSetPasswordDto | input |
Returns
Type | Description |
---|---|
Task |
UpdateAsync(Guid, SaasTenantUpdateDto)
Declaration
[HttpPut]
[Route("{id}")]
public virtual Task<SaasTenantDto> UpdateAsync(Guid id, SaasTenantUpdateDto input)
Parameters
Type | Name | Description |
---|---|---|
Guid | id | |
SaasTenantUpdateDto | input |
Returns
Type | Description |
---|---|
Task<SaasTenantDto> |
UpdateConnectionStringsAsync(Guid, SaasTenantConnectionStringsDto)
Declaration
[HttpPut]
[Route("{id}/connection-strings")]
public Task UpdateConnectionStringsAsync(Guid id, SaasTenantConnectionStringsDto input)
Parameters
Type | Name | Description |
---|---|---|
Guid | id | |
SaasTenantConnectionStringsDto | input |
Returns
Type | Description |
---|---|
Task |