public IActionResult DeleteItemFromOrder(int lineItemId) { var isValidLine = _ordersRepository.GetLineItemById(lineItemId); if (isValidLine != null) { var deletedLine = _ordersRepository.DeleteLine(lineItemId); return(Ok("The line item has been successfully deleted.")); } return(NotFound("That line does not exist and could not be deleted")); }