예제 #1
0
        public ActionResult CreateComment(CreateProductCommentCommand command)
        {
            if (!ModelState.IsValid)
            {
                return(PartialView("CreateComment"));
            }
            command.UserId = CurrentUser.Id;
            var result = _commandBus.Send(command);

            return(JsonMessage(result));
        }
 public async Task <IActionResult> Create([Required] CreateProductCommentCommand request)
 {
     return(Created(await Mediator.Send(request)));
 }