Ejemplo n.º 1
0
        public async Task UpdateUserAsync(UserEditionDto userDto)
        {
            var user = Mapper.Map <User>(userDto);

            await _usersRepository.UpdateAsync(user);

            await _unitOfWorkEf.CommitAsync();

            foreach (var title in user.Titles)
            {
                await _titlesRepository.UpdateAsync(title);
            }

            await _unitOfWorkMongo.CommitAsync();
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Put([FromBody] UserEditionDto user)
        {
            await _usersService.UpdateUserAsync(user);

            return(Ok());
        }