public ActionResult <ClientForProfileDto> GetClient(int clientId) { var client = clientService.GetClientById(clientId); if (client == null) { return(NotFound()); } var clientForProfile = _mapper.Map <ClientForProfileDto>(client); var nbDoneOrders = orderService.GetClientNbDeliveredProducts(clientId); var nbFavoriteProducts = favoritesService.GetClientNbFavoriteProducts(clientId); clientForProfile.NbDoneOrders = nbDoneOrders; clientForProfile.NbFavoriteProducts = nbFavoriteProducts; return(Ok(clientForProfile)); }