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

            return(res);
        }
示例#2
0
        public static internalDTO.Comment MapFromExternal(externalDTO.Comment comment)
        {
            var res = comment == null ? null : new internalDTO.Comment
            {
                Id           = comment.Id,
                Timestamp    = DateTime.UtcNow,
                CommentValue = comment.CommentValue,
                FoodItemId   = comment.FoodItemId,
                AppUserId    = comment.AppUserId,
                AppUser      = AppUserMapper.MapFromExternal(comment.AppUser)
            };


            return(res);
        }