public List <PurchaseOrder> FindPurchaseOrderBySupplier(Supplier supplier) { if (supplierRepository.ExistsById(supplier.SupplierCode)) { return(purchaseOrderRepository.FindBySupplier(supplier.SupplierCode).ToList()); } return(null); }