Ejemplo n.º 1
0
        public async Task <IActionResult> Delete(int id)
        {
            try {
                if (id > 0)
                {
                    var toolTypeDb = await _toolTypeService.deleteToolType(id);

                    if (toolTypeDb == null)
                    {
                        return(NotFound());
                    }
                    return(Ok(toolTypeDb));
                }
                return(BadRequest(ModelState));
            } catch (Exception ex) {
                return(StatusCode(500, ex.Message));
            }
        }