コード例 #1
0
        public static externalDTO.Comment MapFromBLL(internalDTO.DomainLikeDTO.Comment comment)
        {
            var res = comment == null ? null : new externalDTO.Comment()
            {
                Id           = comment.Id,
                CommentTitle = comment.CommentTitle,
                CommentBody  = comment.CommentBody,
                ProductId    = comment.ProductId,
                ShopId       = comment.ShopId
            };

            return(res);
        }
コード例 #2
0
ファイル: CommentMapper.cs プロジェクト: NikitaKums/TalTech
        public static internalDTO.DomainLikeDTO.Comment MapFromBLL(externalDTO.DomainLikeDTO.Comment comment)
        {
            var res = comment == null ? null : new internalDTO.DomainLikeDTO.Comment
            {
                Id           = comment.Id,
                CommentTitle = comment.CommentTitle,
                CommentBody  = comment.CommentBody,
                ProductId    = comment.ProductId,
                Product      = ProductMapper.MapFromBLL(comment.Product),
                ShopId       = comment.ShopId,
                Shop         = ShopMapper.MapFromBLL(comment.Shop)
            };

            return(res);
        }