コード例 #1
0
        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));
        }
コード例 #2
0
        internal async Task <int> CreateLeafCategory(CreateLeafCategoryCommand command)
        {
            var response = await _httpClient.Post <CreateLeafCategoryCommand, int>("api/LeafCategories", command);

            return(response);
        }