Example #1
0
    public virtual async Task <TenantDto> CreateAsync(TenantEditInput input)
    {
        var tenant = await TenantManager.CreateAsync(input.Name);

        tenant = await TenantRepository.InsertAsync(tenant);

        return(tenant.MapTo <TenantDto>());
    }
Example #2
0
    public virtual async Task <TenantDto> UpdateAsync(string id, TenantEditInput input)
    {
        var tenant = await TenantRepository.GetAsync(id);

        await TenantManager.ChangeNameAsync(tenant, input.Name);

        await TenantRepository.UpdateAsync(tenant);

        return(tenant.MapTo <TenantDto>());
    }
Example #3
0
 public virtual Task <TenantDto> UpdateAsync(string id, TenantEditInput input)
 {
     return(TenantService.UpdateAsync(id, input));
 }
Example #4
0
 public virtual Task <TenantDto> CreateAsync(TenantEditInput input)
 {
     return(TenantService.CreateAsync(input));
 }