public async Task <ActionResult> Create(CreateApplicationUserCommand command) { Result createEmployeeCommand = await _mediatorFactory.Execute(command); if (createEmployeeCommand.IsSuccess) { return(RedirectToAction("Index")); } return(BadRequest(createEmployeeCommand.Error)); }
public async Task <ActionResult <ApplicationUser> > Create([FromBody] CreateApplicationUserCommand command) { return(await Mediator.Send(command)); }