public OperationResult <bool> Delete(int id) { if (id <= 0) { return(new OperationResult <bool>("Invalid id", Logger.LogEvent("Invalid id"))); } try { var repository = new SellerRepository(); var seller = repository.ReadById(id); if (seller != null) { repository.Delete(id); return(new OperationResult <bool>(true)); } else { return(new OperationResult <bool>("The specified id was not found", Logger.LogEvent("The specified id was not found"))); } } catch (Exception ex) { return(new OperationResult <bool>("Error deleting the seller", Logger.LogEvent("Error deleting the seller"))); } }