Exemple #1
0
 /// <summary>
 /// BrownBag Controller
 /// </summary>
 /// <param name="customerServices"></param>
 /// <param name="otpServicescs"></param>
 /// <param name="bannerServices"></param>
 /// <param name="productServices"></param>
 public BrownBagController(ICustomerServices customerServices, IOtpServicescs otpServicescs, IBannerServices bannerServices, IProductServices productServices)
 {
     _customerServices = customerServices;
     _otpServicescs    = otpServicescs;
     _bannerServices   = bannerServices;
     _productServices  = productServices;
 }
 //依赖注入
 public HomeController(IBannerServices bannerServices, INewsServices newsServices, INewsClassifyServices newsClassifyServices, INewsCommentServices newsCommentServices)
 {
     this.bannerServices       = bannerServices;
     this.newsServices         = newsServices;
     this.newsClassifyServices = newsClassifyServices;
     this.newsCommentServices  = newsCommentServices;
 }
Exemple #3
0
 public BannerResolver()
 {
     _bannerServices            = HostContainer.GetInstance <IBannerServices>();
     _templateServices          = HostContainer.GetInstance <ITemplateServices>();
     _localizedResourceServices = HostContainer.GetInstance <ILocalizedResourceServices>();
 }
Exemple #4
0
 public BannerResolver()
 {
     _bannerServices = HostContainer.GetInstance<IBannerServices>();
     _templateServices = HostContainer.GetInstance<ITemplateServices>();
     _localizedResourceServices = HostContainer.GetInstance<ILocalizedResourceServices>();
 }
Exemple #5
0
 public BannerController(IBannerServices bannerServices, IMapper mapper)
 {
     _bannerServices = bannerServices;
     _mapper         = mapper;
 }
 public BannerController(IBannerServices bannerServices, IHostingEnvironment host)
 {
     this.bannerServices = bannerServices;
     this.host           = host;
 }
Exemple #7
0
 /* {
  *   get
  *   {
  *
  *       Stopwatch stopwatch = new Stopwatch();
  *       stopwatch.Start();
  *       var keyCacheProductList = "AllProduct";
  *       var cacheValues = DataCache.GetCache<List<ProductHomeModel>>(keyCacheProductList);
  *       if (cacheValues != null)
  *       {
  *           return cacheValues;
  *       }
  *       var rs = ListAllProduct();
  *       NLog.LogManager.GetCurrentClassLogger().Debug(" ListAllProduct() - la {0} giay ", stopwatch.Elapsed.TotalSeconds);  // đã ghi log OK
  *       DataCache.SetCache(keyCacheProductList, rs,
  *           DateTime.Now.Add(TimeSpan.FromMinutes(Globals.TimeCache)));
  *       return rs;
  *   }
  * }
  */
 public HomeService(IUnitOfWork unitOfWork, IBannerServices bannerServices)
 {
     _unitOfWork     = unitOfWork;
     _bannerServices = bannerServices;
     ListProducts    = GetCacheListProducts();
 }
 public BannerApiController()
 {
     _BannerServices = new BannerService();
 }
Exemple #9
0
 public BannerController(IBannerServices bannerServices)
 {
     _bannerServices = bannerServices;
 }
Exemple #10
0
 public BannerController(IBannerServices bannerServices)
 {
     _bannerServices = bannerServices;
 }
Exemple #11
0
 public HomeController(IHomeService homeService, IBannerServices bannerServices)
 {
     _homeService    = homeService;
     _bannerServices = bannerServices;
 }