Пример #1
0
        public async Task <int> Handle(AddProductCommandModel request, CancellationToken cancellationToken)
        {
            var dto       = mapper.Map <AddProductDto>(request);
            var productId = await productCommandService.AddAsync(dto);

            return(productId);
        }
        public async Task <int> Handle(AddProductCommandModel request, CancellationToken cancellationToken)
        {
            var productId = await productCommandService.AddAsync(request.Name, request.NameEng, request.Price, request.Description,
                                                                 request.DescriptionEng, request.AcceptCharms, request.MaxCharmCount, request.Sizes, request.ProductCategoryId);

            return(productId);
        }
Пример #3
0
 public async Task AddProduct([FromBody] ProductDal product)
 {
     await _productCommandService.AddAsync(product);
 }