コード例 #1
0
        public async Task <IActionResult> Add([FromBody] ProductAttributeBindingModel model)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            var productAttribute = await _productAttributeService.AddAttributeAsync(Mapper.Map <ProductAttribute>(model));

            return(Ok());
        }