public static Model.CustomerReviews.CustomerReview ToCustomerReview(this AutoRestClients.TestCustomModule.WebModuleApi.Models.CustomerReview dto)
        {
            var result = new Model.CustomerReviews.CustomerReview()
            {
                AuthorNickname = dto.AuthorNickname,
                Content        = dto.Content,
                CreatedBy      = dto.CreatedBy,
                CreatedDate    = dto.CreatedDate,
                Id             = dto.Id,
                IsActive       = dto.IsActive,
                ModifiedBy     = dto.ModifiedBy,
                ModifiedDate   = dto.ModifiedDate,
                ProductId      = dto.ProductId,
                Rating         = dto.Rating
            };

            return(result);
        }
        public static Model.CustomerReviews.CustomerReview ToCustomerReview(this ReviewDto.CustomerReview itemDto)
        {
            var result = new Model.CustomerReviews.CustomerReview
            {
                Id             = itemDto.Id,
                AuthorNickname = itemDto.AuthorNickname,
                Content        = itemDto.Content,
                CreatedBy      = itemDto.CreatedBy,
                CreatedDate    = itemDto.CreatedDate,
                IsActive       = itemDto.IsActive,
                ModifiedDate   = itemDto.ModifiedDate,
                ModifiedBy     = itemDto.ModifiedBy,
                ProductId      = itemDto.ProductId,
                Rating         = itemDto.Rating
            };

            return(result);
        }
        public static ReviewDto.CustomerReview FromDto(this Model.CustomerReviews.CustomerReview review)
        {
            var result = new ReviewDto.CustomerReview
            {
                AuthorNickname = review.AuthorNickname,
                Content        = review.Content,
                CreatedBy      = review.CreatedBy,
                CreatedDate    = review.CreatedDate,
                Id             = review.Id,
                IsActive       = review.IsActive,
                ModifiedBy     = review.ModifiedBy,
                ModifiedDate   = review.ModifiedDate,
                ProductId      = review.ProductId,
                Rating         = review.Rating
            };

            return(result);
        }
        public static Model.CustomerReviews.CustomerReview ToCustomerReview(this reviewDto.CustomerReview itemDto)
        {
            var result = new Model.CustomerReviews.CustomerReview
            {
                Id             = itemDto.Id,
                AuthorNickname = itemDto.AuthorNickname,
                Content        = itemDto.Content,
                CreatedBy      = itemDto.CreatedBy,
                CreatedDate    = itemDto.CreatedDate,
                IsActive       = itemDto.IsActive,
                ModifiedBy     = itemDto.ModifiedBy,
                ModifiedDate   = itemDto.ModifiedDate,
                ProductID      = itemDto.ProductId,

                UserReviewRate = itemDto.UserReviewRate,

                HelpfullVotesCount = (int)itemDto.HelpfullVotesCount,
                UselessVotesCount  = (int)itemDto.UselessVotesCount,
                TotalVotesCount    = (int)itemDto.TotalVotesCount
            };

            return(result);
        }