Example #1
0
 public async Task <UserInterest> Add(UserInterestCreateViewModel userInterest)
 {
     return(await _userInterestRepository.Add(
                _mapper.Map <UserInterest>(userInterest)));
 }
Example #2
0
        public async Task <IActionResult> AddNewUserInterest([FromBody] UserInterestCreateViewModel newUserInterest)
        {
            var addedUserInterest = await _userInterestService.Add(newUserInterest);

            return(CreatedAtAction(nameof(GetUserInterestById), new { id = addedUserInterest.Id }, addedUserInterest));
        }