コード例 #1
0
 public virtual async Task <TenantDto> UpdateAsync(Guid id, TenantUpdateDto input)
 {
     return(await RequestAsync <TenantDto>(nameof(UpdateAsync), new ClientProxyRequestTypeValue
     {
         { typeof(Guid), id },
         { typeof(TenantUpdateDto), input }
     }));
 }
コード例 #2
0
        public async Task <TenantDto> UpdateAsync(Guid id, TenantUpdateDto input)
        {
            var tenant = await _tenantRepository.GetAsync(id);

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

            await _tenantRepository.UpdateAsync(tenant);

            return(ObjectMapper.Map <Tenant, TenantDto>(tenant));
        }
コード例 #3
0
        public virtual async Task <TenantDto> UpdateAsync(Guid id, TenantUpdateDto input)
        {
            var tenant = await TenantRepository.GetAsync(id);

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

            input.MapExtraPropertiesTo(tenant);
            await TenantRepository.UpdateAsync(tenant);

            return(ObjectMapper.Map <Tenant, TenantDto> (tenant));
        }
コード例 #4
0
        public virtual async Task <TenantDto> UpdateAsync(Guid id, TenantUpdateDto input)
        {
            var tenant = await TenantRepository.GetAsync(id, false);

            var updateEventData = new UpdateEventData
            {
                Id         = tenant.Id,
                OriginName = tenant.Name,
                Name       = input.Name
            };
            await TenantManager.ChangeNameAsync(tenant, input.Name);

            input.MapExtraPropertiesTo(tenant);
            await TenantRepository.UpdateAsync(tenant);

            await EventBus.PublishAsync(updateEventData);

            return(ObjectMapper.Map <Tenant, TenantDto>(tenant));
        }
コード例 #5
0
 public virtual Task <TenantDto> UpdateAsync(Guid id, TenantUpdateDto input)
 {
     return(TenantAppService.UpdateAsync(id, input));
 }
コード例 #6
0
 public Task <TenantDto> UpdateAsync(Guid id, TenantUpdateDto input)
 {
     return(_service.UpdateAsync(id, input));
 }
コード例 #7
0
 public Task <TenantDto> UpdateAsync(string id, TenantUpdateDto input)
 {
     return(_tenantAppService.UpdateAsync(id.ToGuid(), input));
 }