public HomeController(ILogger <HomeController> logger , IProductDAL productDAL ) { _logger = logger; this.ProductDAL = productDAL; }
public ServiceContract() { userDAL = (IUserDAL)ContextRegistry.GetContext().GetObject("UserDAL"); orderDAL = (IOrderDAL)ContextRegistry.GetContext().GetObject("OrderDAL"); orderItemDAL = (IOrderItemDAL)ContextRegistry.GetContext().GetObject("OrderItemDAL"); productDAL = (IProductDAL)ContextRegistry.GetContext().GetObject("ProductDAL"); }
public HomeController() { this.productDAL = new ProductDAL(); productContainer = new ProductContainer(productDAL); //ILogger<HomeController> logger //_logger = logger; }
public ProductManager(IProductDAL _productDal, ICategoryDAL categoryDAL, ISupplierDAL supplierDAL) { this._productDal = _productDal; _categoryDAL = categoryDAL; _supplierDAL = supplierDAL; }
public OrdersController() { _productDal = new ProductDAL(); _productRepository = new ProductRepository(_productDal); _paymentSeriveRepository = new PaymentSeriveRepository(); _emailRepository = new EmailRepository(); _orderRepository = new OrderRepository(_productRepository, _paymentSeriveRepository, _emailRepository); }
public CampaignController(ICampaignDAL campaigndal, ICategoryDAL categorydal, IMakeDAL makedal, IProductModelDAL modeldal, IProductDAL productdal, IUserDAL userdal) { CampaignDAL = campaigndal; CategoryDAL = categorydal; MakeDAL = makedal; ModelDAL = modeldal; ProductDAL = productdal; UserDAL = userdal; }
public ElasticReorganizer(IElasticSearchService elasticSearchService, IProductDAL productDAL, ICategoryDAL categoryDAL, ISupplierDAL supplierDAL) { _elasticSearchService = elasticSearchService; _productDAL = productDAL; _categoryDAL = categoryDAL; _supplierDAL = supplierDAL; }
public ProductController(IProductDAL productdal, IProductCommentDAL commentdal, IProductPictureDAL picturedal, IProductTechnicPropertyDAL propertyvaluedal, IPropertyDAL propertdal, IProductModelDAL modeldal, IMakeDAL makedal, ICategoryDAL categorydal) { ProductDAL = productdal; CommentDAL = commentdal; PictureDAL = picturedal; PropertyValueDAL = propertyvaluedal; PropertyDAL = propertdal; ModelDAL = modeldal; MakeDAL = makedal; CategoryDAL = categorydal; }
/// <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="connnectionString"></param> public static void Init(DatabaseTypes dbType, string connnectionString) { switch (dbType) { case DatabaseTypes.SQLServer: ProductDB = new DataLayers.SQLServer.ProductDAL(connnectionString); break; default: throw new Exception("database is not supported"); } }
public ProductManager(IUnitOfWork uow, IProductDAL productDAL, IProductDemandDAL productDemandDAL, IProductImageDAL productImageDAL, IBrandDAL brandDAL, IColorDAL colorDAL, ICategoryDAL categoryDAL, IDemandTypeDAL demandTypeDAL, IOptions <FileUploadSettings> fileUploadSettings, IProductColorDAL productColorDAL) { _uow = uow; _productDAL = productDAL; _productDemandDAL = productDemandDAL; _productColorDAL = productColorDAL; _productImageDAL = productImageDAL; _brandDAL = brandDAL; _colorDAL = colorDAL; _categoryDAL = categoryDAL; _demandTypeDAL = demandTypeDAL; _fileUploadSettings = fileUploadSettings.Value; }
public OrderController(ICityDAL _cityDAL, IDistrictDAL _districtDAL, IOrderDAL _orderDAL, IUserDAL _userDAL, IUserTypeDAL _userTypeDAL, IProductDAL _productDAL, IUserAddressDAL _userAddressDAL, IUserCardDAL _userCardDAL, IUserDetailDAL _userDetailDAL, IBasketProductDAL _basketProductDAL) { basketProductDAL = _basketProductDAL; userDetailDAL = _userDetailDAL; userCardDAL = _userCardDAL; userAddressDAL = _userAddressDAL; productDAL = _productDAL; userTypeDAL = _userTypeDAL; orderDAL = _orderDAL; cityDAL = _cityDAL; districtDAL = _districtDAL; userDAL = _userDAL; currentUser = System.Web.HttpContext.Current.Session["user"] as ETicaret.Model.Models.Entity.User; }
public DeliveryManager( IDeliveryDAL deliveryDAL, ICartDAL cartDAL, IProductDAL productDAL, ICategoryDAL categoryDAL, ICartProductDAL cartProductDAL ) { _cartDAL = cartDAL; _productDAL = productDAL; _categoryDAL = categoryDAL; _deliveryDAL = deliveryDAL; _cartProductDAL = cartProductDAL; }
public CartManager ( ICartDAL cartDAL, IProductDAL productDAL, ICouponDAL couponDAL, ICampaignDAL campaignDAL, ICategoryDAL categoryDAL, IDeliveryDAL deliveryDAL, ICartProductDAL cartProductDAL ) { _cartDAL = cartDAL; _productDAL = productDAL; _couponDAL = couponDAL; _campaignDAL = campaignDAL; _categoryDAL = categoryDAL; _deliveryDAL = deliveryDAL; _cartProductDAL = cartProductDAL; }
/// <summary> /// Khởi tạo lớp tác nghiệp /// </summary> /// <param name="dbType"></param> /// <param name="connectString"></param> public static void Init(DatabaseTypes dbType, string connectString) { switch (dbType) { case DatabaseTypes.SQLServer: CountryDB = new DataLayers.SQLServer.CountryDAL(connectString); CityDB = new DataLayers.SQLServer.CityDAL(connectString); SupplierDB = new DataLayers.SQLServer.SupplierDAL(connectString); CustomerDB = new DataLayers.SQLServer.CustomerDAL(connectString); CategorieDB = new DataLayers.SQLServer.CategorieDAL(connectString); ShipperDB = new DataLayers.SQLServer.ShipperDAL(connectString); EmployeeDB = new DataLayers.SQLServer.EmployeeDAL(connectString); ProductDB = new DataLayers.SQLServer.ProductDAL(connectString); break; case DatabaseTypes.FakeDB: break; default: throw new Exception("Database Type is not supported"); } }
ICategoryService _categoryService; //bir servis içerisinde başka bir dal operasyonu çağırılmaz, servis üzerinden erişilir. public ProductManager(IProductDAL productDal, ICategoryService categoryService) { _productDal = productDal; _categoryService = categoryService; }
public ProductManager(IProductDAL productDAL, ICategoryService categoryService) { _productDAL = productDAL; // Injection > burada asla InMemory, eF vs tipler olmaz!! _categoryService = categoryService; }
public ProductBLL(IProductDAL productDAL) { this.productDAL = productDAL; Dal = productDAL; }
public ProductBLL(IProductDAL stub) { _product = stub; }
public ProductManager(IProductDAL productDAL) { _productDAL = productDAL; }
public ProductsController(IProductDAL dal) { this.dal = dal; }
public ShoppingCartController() { productDAL = new ProductSqlDAL(ConfigurationManager.ConnectionStrings["SSGeek"].ConnectionString); }
public ProductBLL() { _product = new ProductDAL(); }
public ProductController(IProductDAL productdal, IProductModelDAL productmodeldal, ICategoryDAL categorydal) { ProductDAL = productdal; ProductModelDAL = productmodeldal; CategoryDAL = categorydal; }
public StoreController(IProductDAL productDal) { this.productDal = productDal; }
public ShoppingCartController() { connectionString = ConfigurationManager.ConnectionStrings["SSGeek"].ConnectionString; dal = new ProductSqlDAL(connectionString); }
/// <summary> /// 依赖注入:高层ProductBLL对底层ProductDAL的依赖,通过ProductBLL(IProductDAL productDAL)构造函数注入到ProductBLL中 /// </summary> /// <param name="productDAL"></param> public ProductBLL(IProductDAL productDAL) { _productDAL = productDAL; }
public ProductBAL(IProductDAL productDAL) { _productDAL = productDAL ?? throw new ArgumentNullException(nameof(productDAL)); }
public ProductBLL(IProductDAL stub) { _product = stub; }
public ProductManager(IProductDAL productDal) { _productDal = productDal; }
public ProductService(IProductDAL productDAL) { _productDAL = productDAL; }
public OrderBLL() { _order = new OrderDAL(); _product = new ProductDAL(); _customer = new CustomerDAL(); }
public ProductBL(IProductDAL idetails) { details = idetails; }
public ProductBLL(IProductDAL iProductDAL) { _productDAL = iProductDAL; _loggingBLL = new LoggingBLL(); }
public StoreController(IProductDAL dal) { this.dal = dal; }
public ProductBLL() { _productDAL = new ProductDAL(); _loggingBLL = new LoggingBLL(); }
public ShoppingCartController(IProductDAL dal) { _dal = dal; }
public OrderBLL(IOrderDAL stub) { _order = stub; _product = new ProductDALStub(); _customer = new CustomerDALStub(); }