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(); }
public async Task <IActionResult> UpdateUserProfile(string userId, [FromBody] UserProfileUpdateRequestViewModel uvm) { await this.usersService.UpdateUserProfileAsync(userId, uvm); return(NoContent()); }