public ActionResult <FriendDto> PostFriend(CreateFriendRequest request) { var newFriend = new FriendEntity() { Name = request.Name }; var Friend = _friendService.CreateFriend(newFriend); return(CreatedAtAction("GetFriend", new { id = Friend.Id }, Friend)); }
public async Task<IActionResult> Create(CreateFriendRequest friend) { var FriendDto = _mapper.Map<FriendDto>(friend); return _actionResultConverter.Convert(await _friendService.Create(FriendDto)); }