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); }
public async Task AddProduct([FromBody] ProductDal product) { await _productCommandService.AddAsync(product); }