public async Task <IActionResult> CreateMenu([FromBody] CreateMenuRequestModel menuRequest) { var managementUserId = User.GetManagementUserId(); var command = new MenuCreateCommand(menuRequest.Name, menuRequest.CreateDateTime, managementUserId); var response = await _mediator.Send(command); return(response.ToActionResult()); }
public async Task <IActionResult> Post(MenuCreateCommand command) { var result = await _mediator.Send(command); return(Ok(result)); }