public async Task <IActionResult> Create(CreateLeafCategoryCommand command) { var id = 0; _eventListener.Subscribe(new ActionHandler <EntityCreated>(a => { id = a.Id; })); await _bus.Dispatch(command); return(Ok(id)); }
internal async Task <int> CreateLeafCategory(CreateLeafCategoryCommand command) { var response = await _httpClient.Post <CreateLeafCategoryCommand, int>("api/LeafCategories", command); return(response); }