public async Task <UserInterest> Add(UserInterestCreateViewModel userInterest) { return(await _userInterestRepository.Add( _mapper.Map <UserInterest>(userInterest))); }
public async Task <IActionResult> AddNewUserInterest([FromBody] UserInterestCreateViewModel newUserInterest) { var addedUserInterest = await _userInterestService.Add(newUserInterest); return(CreatedAtAction(nameof(GetUserInterestById), new { id = addedUserInterest.Id }, addedUserInterest)); }