示例#1
0
        public async Task <string> UpdateUserAsync(Guid userId, UserModel userModel)
        {
            var user = await _userRepository.GetUserAsync(userId);

            if (user == null)
            {
                return("User is not found");
            }

            user.LastName   = userModel.LastName;
            user.Name       = userModel.Name;
            user.Patronymic = userModel.Patronymic;
            await _userRepository.SaveAsync();

            await _informationService.UpdateUserInformationAsync(user.UserInformation, userModel.UserInformation);

            return("User Information Updated");
        }