public IActionResult Add(ProductUnit productUnit) { var result = _productUnitService.Add(productUnit); if (result.Success) { return(Ok(result.Message)); } return(BadRequest(result.Message)); }
public async Task <ActionResult <bool> > Add(InsertProductUnitModel request) { return(Ok(await _productUnitService.Add(await GetUserId(), request, GetPermissionId()))); }
public async Task <int> Add(ProductUnitModel _model) { ProductUnit entity = iMapper.Map <ProductUnit>(_model); return(await svcProductUnit.Add(entity)); }