Пример #1
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);
 }
Пример #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);

            tenant.SetConcurrencyStampIfNotNull(input.ConcurrencyStamp);
            input.MapExtraPropertiesTo(tenant);

            await TenantRepository.UpdateAsync(tenant);

            return(ObjectMapper.Map <Tenant, TenantDto>(tenant));
        }
Пример #4
0
 public virtual Task <TenantDto> UpdateAsync(Guid id, TenantUpdateDto input)
 {
     return(TenantAppService.UpdateAsync(id, input));
 }