示例#1
0
        public Unit Handle(UpdatePostCommand input)
        {
            var post = _context.GetById <Post, int>(input.Id);

            _mapper.Map(input, post);

            return(Unit.Value);
        }
示例#2
0
        public PostEditDto Handle(GetPostByIdQuery input)
        {
            var post = _context.GetById <Post, int>(input.Id);

            return(_mapper.Map <PostEditDto>(post));
        }