Example #1
0
        public async Task <IActionResult> DeleteUnitById(int id)
        {
            try {
                await _unitService.DeleteUnitById(id);
            } catch (ArgumentException e) {
                ModelState.AddModelError("Exception", e.Message);
                return(BadRequest(ModelState));
            }

            return(Ok());
        }