public virtual async Task <TenantDto> CreateAsync(TenantEditInput input) { var tenant = await TenantManager.CreateAsync(input.Name); tenant = await TenantRepository.InsertAsync(tenant); return(tenant.MapTo <TenantDto>()); }
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>()); }
public virtual Task <TenantDto> UpdateAsync(string id, TenantEditInput input) { return(TenantService.UpdateAsync(id, input)); }
public virtual Task <TenantDto> CreateAsync(TenantEditInput input) { return(TenantService.CreateAsync(input)); }