public IActionResult Add(ProductUnit productUnit)
        {
            var result = _productUnitService.Add(productUnit);

            if (result.Success)
            {
                return(Ok(result.Message));
            }

            return(BadRequest(result.Message));
        }
예제 #2
0
 public async Task <ActionResult <bool> > Add(InsertProductUnitModel request)
 {
     return(Ok(await _productUnitService.Add(await GetUserId(),
                                             request,
                                             GetPermissionId())));
 }
예제 #3
0
        public async Task <int> Add(ProductUnitModel _model)
        {
            ProductUnit entity = iMapper.Map <ProductUnit>(_model);

            return(await svcProductUnit.Add(entity));
        }