コード例 #1
0
        public async Task UpdateUserProfileAsync(string userId, UserProfileUpdateRequestViewModel profileVm)
        {
            var profile = await this.usersRepository.FirstAsync(x => x.UserId == userId);

            profile.About       = profileVm.About;
            profile.DisplayName = profileVm.DisplayName;

            this.usersRepository.Update(profile);
            await this.uow.SaveChangesAsync();
        }
コード例 #2
0
        public async Task <IActionResult> UpdateUserProfile(string userId, [FromBody] UserProfileUpdateRequestViewModel uvm)
        {
            await this.usersService.UpdateUserProfileAsync(userId, uvm);

            return(NoContent());
        }