示例#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 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));
        }