public IActionResult Delete(int id) { var retriveSales = _SaleManager.GetById(id); if (retriveSales == null) { return(BadRequest(new { error = " not Found!" })); } bool isDelete = _SaleManager.Remove(retriveSales, false); if (isDelete) { return(Ok(retriveSales)); } return(BadRequest(new { error = "Failed To Delete!" })); }