public void DeleteTools(int toolsId) { var tools = toolsRepository.GetById(toolsId); if (tools.ToolsId == 0) { return; //throw exception aqui !!! } toolsRepository.Delete(tools); }