예제 #1
0
        public ActionResult Charge(ChargeAccountCommand command)
        {
            if (!ModelState.IsValid)
            {
                return(View("Charge"));
            }
            var result = _commandBus.Send(command);

            return(JsonMessage(result));
        }
예제 #2
0
        public async Task <IActionResult> ChargeAccount([FromBody] ChargeAccountCommand command)
        {
            var response = await mediator.Send(command);

            return(Ok(response));
        }