public OrdersController(IOrderDAL oDAL, ICustomerDAL cDAL, ILocationDAL lDAL, ILogger <OrdersController> logger) { _context = oDAL; _custContext = cDAL; _locContext = lDAL; this.logger = logger; }
public Customer(ICustomerDAL customerDAL, IAddToOrderDAL addtoorderDAL, IItemDAL itemDAL, IOrderDAL orderDAL) { _customerDAL = customerDAL; _addtoorderDAL = addtoorderDAL; _itemDAL = itemDAL; _orderDAL = orderDAL; }
public User(IShipperDAL shipperDAL, IItemDAL itemDAL, ICustomerDAL customerDAL, IOrderDAL orderDAL, IAddToOrderDAL addtoorderDAL) { _shipperDAL = shipperDAL; _itemDAL = itemDAL; _customerDAL = customerDAL; _orderDAL = orderDAL; _addtoorderDAL = addtoorderDAL; }
public CustomerMgr(IConfiguration config, LocationMgr lm, OrderMgr om) { CustomerDAL specifc_DAL = new CustomerDAL(); DAL = specifc_DAL; _ordManager = om; _locManager = lm; }
static void Main(string[] args) { ICustomerDAL[] customerDals = new ICustomerDAL[2] { new SQLServer(), new OracleServer() }; foreach (var item in customerDals) { item.Add(); } Console.ReadKey(); }
/// <summary> /// Khởi tạo tính năng tác nghiệp (Hàm này phải được gọi nếu muốn sử dụng các tính năng của lớp) /// </summary> /// <param name="dbType"></param> /// <param name="connectionString"></param> public static void Init(DatabaseTypes dbType, string connectionString) { switch (dbType) { case DatabaseTypes.SQLServer: CountryDB = new DataLayers.SQLServer.CountryDAL(connectionString); CityDB = new DataLayers.SQLServer.CityDAL(connectionString); SupplierDB = new DataLayers.SQLServer.SupplierDAL(connectionString); CategoryDB = new DataLayers.SQLServer.CategoryDAL(connectionString); CustomerDB = new DataLayers.SQLServer.CustomerDAL(connectionString); EmployeeDB = new DataLayers.SQLServer.EmployeeDAL(connectionString); ShipperDB = new DataLayers.SQLServer.ShipperDAL(connectionString); break; default: throw new Exception("Database Type is not Supported"); } }
static void Main(string[] args) { //InterfacePart2(); /* Polymorphisim(çok biçimlilik), bir nesneyi farklı amaçlarla implement edip, * o implementationların belirli bir kısmına veya tamamına ulaşmaktır. */ // Polymorphisim: ICustomerDAL[] customerDALs = new ICustomerDAL[] { new SqlServerCustomerDAL(), new OracleCustomerDAL(), new MySqlCustomerDAL() }; foreach (var customerDAL in customerDALs) { customerDAL.Add(); // Veritabanları gezilip, herbiri için Add() çağırılır. } // Yeni bir veritabanı desteği eklenmek istenirse, kodlara dokunulmadan yeni kısımlar eklenir. }
public CustomersController(ICustomerDAL customerDAL) { this.customerDAL = customerDAL; }
public OrderService(IOrderDAL orderDAL, ICustomerDAL customerDAL, IEmployeeDAL employeeDAL) { _orderDAL = orderDAL; _customerDAL = customerDAL; _employeeDAL = employeeDAL; }
public CustomerBLL(ICustomerDAL dal, Logger logger) { }
public CustomerBLL(ICustomerDAL stub) { _customer = stub; }
public CustomerBLLConstructor(ICustomerDAL dal, Logger logger) { }
public CustomerUsersLogic() { CustomerDAL = new CustomerDAL(); }
public ImporterConstructor(ICustomerDAL dal, Logger log) { this.dal = dal; this.log = log; }
public ReviewController(IActorDAL adal, ICustomerDAL cdal, IFilmDAL fdal) { _actors = adal; _customers = cdal; _films = fdal; }
public CustomerBLL() { this.customerDAL = new CustomerDAL(); }
public CustomersController(ICustomerDAL customerDal) { _customerDAL = customerDal; }
public OrderBLL(IOrderDAL stub) { _order = stub; _product = new ProductDALStub(); _customer = new CustomerDALStub(); }
public OrderBLL() { _order = new OrderDAL(); _product = new ProductDAL(); _customer = new CustomerDAL(); }
public Customer(ICustomerDAL customerDAL) { _customerDAL = customerDAL; }
public CustomerManager(ICustomerDAL customerDal) { _iCustomerDal = customerDal; }
/// <summary> /// The MVC framework with the assistance of Ninject, automatically passes in a CustomerDAL. /// </summary> /// <param name="dal"></param> public CustomerController(ICustomerDAL dal) { this.dal = dal; }
public CustomerBLL(ICustomerDAL ic, Logger logger) { CustomerDAL = ic; Logger = logger; }
public CustomerUsersLogic(ICustomerDAL stub) { CustomerDAL = stub; }
public CustomerBLL(ICustomerDAL dal, Logger logger) { this.dal = dal; this.logger = logger; }
public CustomerBLL() { _customer = new CustomerDAL(); }
public CustomerBLL(ICustomerDAL dal, Logger logger) { CustomerDAL = dal; Logger = logger; }
public CustomerBLL() { _ICustomerDAL = new CustomerDAL(); }
public RentalManager(IRentalDAL rentalDAL, ICarDAL carDAL, ICustomerDAL customerDAL) { _rentalDAL = rentalDAL; _carDAL = carDAL; _customerDAL = customerDAL; }
public CustomerBLL(ICustomerDAL iCustomerDAL) { _customerDAL = iCustomerDAL; _loggingBLL = new LoggingBLL(); }
public void Update(ICustomerDAL customerDAL) // ICustomerDAL veri tipi ile onu kullanan her tipin kullanılması sağlanır. { customerDAL.Update(); // Seçilen, gönderilen tipin Update()'i çalışır. }
public CustomerBLL() { _customerDAL = new CustomerDAL(); _loggingBLL = new LoggingBLL(); }