/// <summary> /// Initializes a new instance of the <see cref="ContractLogic"/> class. /// </summary> /// <param name="contractRepository">The contract repository.</param> /// <param name="serviceTypeLogic">The service type logic.</param> /// <param name="paymentResultLogic">The payment result logic.</param> public ContractLogic(IContractRepository contractRepository, IContractServiceTypeLogic serviceTypeLogic, IPaymentResultLogic paymentResultLogic) { if (contractRepository != null) { _contractRepository = contractRepository; } if (serviceTypeLogic != null) { _serviceTypeLogic = serviceTypeLogic; } if (paymentResultLogic != null) { _paymentResultLogic = paymentResultLogic; } }
/// <summary> /// Initializes a new instance of the <see cref="ContractLogic"/> class. /// </summary> /// <param name="connectionString">The connection string.</param> public ContractLogic(string connectionString) { _contractRepository = Factory.CreateInstance <IContractRepository>(connectionString, true); _serviceTypeLogic = Factory.CreateInstance <IContractServiceTypeLogic>(connectionString, true); _paymentResultLogic = Factory.CreateInstance <IPaymentResultLogic>(connectionString, true); }