public void Post() { var factorItems = new List <FactorItem> { FactorItem.CreateFactorItem(Guid.Empty, Guid.Empty, 10) }; var createFactorCommand = new CreateFactorCommand(System.DateTime.Now.AddDays(7), "Factor", "-", factorItems); var factorFacade = ServiceLocator.Current.Resolve <IFactorFacade>(); factorFacade.CreateFactor(createFactorCommand); }
public async Task <IActionResult> RegisterFactor([FromBody] CreateFactorCommand cmd) { int factorId = 0; if (ModelState.IsValid) { factorId = await _mediator.Send(cmd); } return(Ok(factorId)); }
public async Task <ActionResult <long> > Create([FromBody] CreateFactorCommand command) { var productId = await Mediator.Send(command); return(Ok(productId)); }
public void CreateFactor(CreateFactorCommand command) { CommandBus.Dispatch(command); }