Ejemplo n.º 1
0
        public IActionResult CreateItem(int typeId, double quantity)
        {
            Item item = new Item()
            {
                ItemTypeId = typeId,
                Quantity   = quantity
            };

            var id = _facade.CreateItem(item);

            return(Ok(id));
        }
Ejemplo n.º 2
0
        public void Handle(GoodsCreatedEvent eventToHandle)
        {
            var command = new CreateItemCommand(eventToHandle.Title, "Create From Store", eventToHandle.CreatedGoodsId);

            itemFacade.CreateItem(command);
        }