public ActionResult Delete(DeleteTweetCommand command) { var service = new Commanding.SimpleTwitterCommandServiceClient(); service.Delete(command); return(RedirectToAction("Index")); }
public async Task <IActionResult> Delete(Guid userId, Guid tweetId) { var deleteTweetCommand = new DeleteTweetCommand(userId, tweetId); await _mediator.Send(deleteTweetCommand); return(NoContent()); }
public void Delete(DeleteTweetCommand command) { var service = NcqrsEnvironment.Get <ICommandService>(); service.Execute(command); }