Пример #1
0
        public IActionResult Index(int id, int skuId = 0, int type = 0, int page = 1, int size = 20)
        {
            var model = new CommentIndexModel();

            model.Item     = DefaultStorage.ItemMiniGet(id);
            model.Comment  = DefaultStorage.ItemCommentGet(id);
            model.Comments = DefaultStorage.CommentPagedList(id, skuId, type, page, size);
            return(View(model));
        }
Пример #2
0
        public IActionResult Index()
        {
            var comments = _commentService.GetAll()
                           .Select(c => new CommentViewModel {
                Id         = c.Id,
                ContentCmt = c.Content,
                Commented  = c.Created
            });
            var model = new CommentIndexModel {
                listComment = comments
            };

            return(View(model));
        }