public void Connect(Facility facility) { if (Transaction == null) { throw new InvalidOperationException("Transaction is required."); } facility.CheckNull("facility"); Repository.FacilityEDTTransactions.EnsureExists(facility, Transaction); }