コード例 #1
0
        public ActionResult <ListBorrowResponse> Borrow(int id)
        {
            if (!FriendExists(id))
            {
                return(NotFound("Amigo não existe na base de dados."));
            }

            var result = _friendService.Borrows(id);

            if (result == null)
            {
                return(NoContent());
            }

            var response = new ListBorrowResponse();

            response.Games.AddRange(result.Select(_mapper.Map <GameDto>));

            return(response);
        }