Example #1
0
        public void DeleteTools(int toolsId)
        {
            var tools = toolsRepository.GetById(toolsId);

            if (tools.ToolsId == 0)
            {
                return; //throw exception aqui !!!
            }
            toolsRepository.Delete(tools);
        }
Example #2
0
        public async Task <IActionResult> DeleteToolState(int id)
        {
            var toolStateFromRepo = await _repo.GetCurrentToolState(id);

            _repo.Delete(toolStateFromRepo);

            if (await _repo.SaveAll())
            {
                return(Ok());
            }

            return(BadRequest("Failed to delete the tool state"));
        }
Example #3
0
 public Tool Delete(long id)
 {
     return(toolsRepository.Delete(id));
 }