Beispiel #1
0
 public OrderOrchestrationTrigger(AppSettings appSettings, IOrderCloudIntegrationsFunctionToken token,
                                  ISupplierSyncCommand supplier, LogQuery log, IProductUpdateCommand productUpdateCommand)
 {
     _productUpdateCommand = productUpdateCommand;
     _log         = log;
     _appSettings = appSettings;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ProductController"/> class.
 /// </summary>
 /// <param name="hubContext"></param>
 /// <param name="pageQueryCommand">The page query command</param>
 /// <param name="getAllCommand">The get all command.</param>
 /// <param name="getByIdCommand">The get by identifier command.</param>
 /// <param name="insertCommand">The insert command.</param>
 /// <param name="updateCommand">The update command.</param>
 /// <param name="deleteCommand">The delete command.</param>
 public ProductController(IHubContext <GlobalHub, IGlobalHub> hubContext, IProductPageQueryCommand pageQueryCommand, IProductGetAllCommand getAllCommand, IProductGetByIdCommand getByIdCommand, IProductInsertCommand insertCommand, IProductUpdateCommand updateCommand, IProductDeleteCommand deleteCommand) : base(/*hubContext*/)
 {
     this.SignalRHubContext = hubContext;
     this.PageQueryCommand  = pageQueryCommand;
     this.GetAllCommand     = getAllCommand;
     this.GetByIdCommand    = getByIdCommand;
     this.InsertCommand     = insertCommand;
     this.UpdateCommand     = updateCommand;
     this.DeleteCommand     = deleteCommand;
 }
Beispiel #3
0
 public IActionResult Put(int id, [FromBody] ProductChangeDto dto, [FromServices] IProductUpdateCommand command)
 {
     dto.Id = id;
     executor.ExecuteCommand(command, dto);
     return(NoContent());
 }