public TradeViewModel mapDbTradeModelToViewTrade(Trade trade)
        {
            var initiator         = _booksDealersRepository.GetUserById(trade.InitiatiorId);
            var initiatorUserData = new UserData
            {
                Id   = initiator.Id,
                Name = initiator.Name
            };
            var targetOwner         = _booksDealersRepository.GetUserById(trade.TargetOwnerId);
            var targetOwnerUserData = new UserData
            {
                Id   = targetOwner.Id,
                Name = targetOwner.Name
            };
            var offer             = _booksService.mapDbBookModelToViewBook(_booksDealersRepository.GetBook(trade.InitiatorOfferId));
            var target            = _booksService.mapDbBookModelToViewBook(_booksDealersRepository.GetBook(trade.TargetId));
            var comments          = (List <Comment>)trade.Comments;
            var commentsViewModel = new List <CommentViewModel>();

            comments.ForEach(x => { commentsViewModel.Add(mapDbCommentModelToViewModel(x)); });

            var tradeViewModel = new TradeViewModel
            {
                Id             = trade.Id,
                Status         = trade.Status,
                CreationDate   = trade.CreationDate.ToString(),
                LastUpdated    = trade.LastUpdated.ToString(),
                Initiator      = initiatorUserData,
                TargetOwner    = targetOwnerUserData,
                InitiatorOffer = offer,
                Target         = target,
                Comments       = commentsViewModel
            };

            return(tradeViewModel);
        }
 public Book GetBook(int Id)
 {
     return(_booksDealersRepository.GetBook(Id));
 }