Beispiel #1
0
        public static Domain.Comment MapFromDAL(DAL.App.DTO.DomainLikeDTO.Comment comment)
        {
            var res = comment == null ? null : new Domain.Comment
            {
                Id           = comment.Id,
                CommentTitle = new MultiLangString(comment.CommentTitle),
                CommentBody  = new MultiLangString(comment.CommentBody),
                ProductId    = comment.ProductId,
                Product      = ProductMapper.MapFromDAL(comment.Product),
                ShopId       = comment.ShopId,
                Shop         = ShopMapper.MapFromDAL(comment.Shop)
            };

            return(res);
        }
Beispiel #2
0
        public static externalDTO.DomainLikeDTO.Comment MapFromDAL(internalDTO.DomainLikeDTO.Comment comment)
        {
            var res = comment == null ? null : new externalDTO.DomainLikeDTO.Comment
            {
                Id           = comment.Id,
                CommentTitle = comment.CommentTitle,
                CommentBody  = comment.CommentBody,
                ProductId    = comment.ProductId,
                Product      = ProductMapper.MapFromDAL(comment.Product),
                ShopId       = comment.ShopId,
                Shop         = ShopMapper.MapFromDAL(comment.Shop)
            };

            return(res);
        }