public InvoiceController(InvoiceBusinessLogic invoiceLogic, DetailLineBusinessLogic detailLogic, CustomerBusinessLogic customerLogic) { _invoiceLogic = invoiceLogic; _detailLogic = detailLogic; _customerLogic = customerLogic; }
public CustomerService() { _customerBL = new CustomerBusinessLogic(); // CustomerService class creates and sets CustomerDataAccess // class using this public property _customerBL.DataAccess = new CustomerDataAccess(); }
// End of CustomerDataAccess Class public ConstructorInjection() { CustomerBusinessLogic constructorInjection = new CustomerBusinessLogic(); string cName = constructorInjection.GetCustomerName(3); Console.WriteLine(cName); }
public CustomerService() { //Contstructor injection _customerBL = new CustomerBusinessLogic(new CustomerDataAccess()); //Property Injection _customerBL.DataAccess = new CustomerDataAccess(); //Method Injection _customerBL.SetDependency(new CustomerDataAccess()); }
public CustomerService() { _customerBusinessLogic = new CustomerBusinessLogic(new CustomerDataAccess()); }
public CustomerService() { _customerBL = new CustomerBusinessLogic(); ((IDataAccessDependency)_customerBL).SetDependency(new CustomerDataAccess()); }
public CustomerService() { _logic = new CustomerBusinessLogic(); _logic.SetDependency(new DataAccess()); }
public CustomerController(CustomerBusinessLogic customerLogic, InvoiceBusinessLogic invoiceLogic) { _customerLogic = customerLogic; _invoiceLogic = invoiceLogic; }
public CustomerService() { _customerBL = new CustomerBusinessLogic(); _customerBL.DataAccess = new CustomerDataAccess(); }