public bool Delete(long id) { bool deleted = Repo.Delete(id); Unit.SaveChanges(); return(deleted); }
public IActionResult DeletePath([FromRoute] int id) { try { Path path = _pathRepository.GetById(id); if (path == null) { return(NotFound()); } _pathRepository.Delete(path); return(Accepted()); } catch (Exception ex) { return(BadRequest(ex.Message)); } }