예제 #1
0
 public InvoiceController(InvoiceBusinessLogic invoiceLogic, DetailLineBusinessLogic detailLogic,
                          CustomerBusinessLogic customerLogic)
 {
     _invoiceLogic  = invoiceLogic;
     _detailLogic   = detailLogic;
     _customerLogic = customerLogic;
 }
예제 #2
0
 public CustomerService()
 {
     _customerBL = new CustomerBusinessLogic();
     // CustomerService class creates and sets CustomerDataAccess
     // class using this public property
     _customerBL.DataAccess = new CustomerDataAccess();
 }
예제 #3
0
        // End of CustomerDataAccess Class


        public ConstructorInjection()
        {
            CustomerBusinessLogic constructorInjection =
                new CustomerBusinessLogic();

            string cName = constructorInjection.GetCustomerName(3);

            Console.WriteLine(cName);
        }
예제 #4
0
            public CustomerService()
            {
                //Contstructor injection
                _customerBL = new CustomerBusinessLogic(new CustomerDataAccess());

                //Property Injection
                _customerBL.DataAccess = new CustomerDataAccess();

                //Method Injection
                _customerBL.SetDependency(new CustomerDataAccess());
            }
예제 #5
0
파일: backUp.cs 프로젝트: SY81517/Quiita
 public CustomerService()
 {
     _customerBusinessLogic = new CustomerBusinessLogic(new CustomerDataAccess());
 }
예제 #6
0
 public CustomerService()
 {
     _customerBL = new CustomerBusinessLogic();
     ((IDataAccessDependency)_customerBL).SetDependency(new CustomerDataAccess());
 }
예제 #7
0
 public CustomerService()
 {
     _logic = new CustomerBusinessLogic();
     _logic.SetDependency(new DataAccess());
 }
 public CustomerController(CustomerBusinessLogic customerLogic, InvoiceBusinessLogic invoiceLogic)
 {
     _customerLogic = customerLogic;
     _invoiceLogic  = invoiceLogic;
 }
예제 #9
0
 public CustomerService()
 {
     _customerBL            = new CustomerBusinessLogic();
     _customerBL.DataAccess = new CustomerDataAccess();
 }