/// <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; }
public BannerResolver() { _bannerServices = HostContainer.GetInstance <IBannerServices>(); _templateServices = HostContainer.GetInstance <ITemplateServices>(); _localizedResourceServices = HostContainer.GetInstance <ILocalizedResourceServices>(); }
public BannerResolver() { _bannerServices = HostContainer.GetInstance<IBannerServices>(); _templateServices = HostContainer.GetInstance<ITemplateServices>(); _localizedResourceServices = HostContainer.GetInstance<ILocalizedResourceServices>(); }
public BannerController(IBannerServices bannerServices, IMapper mapper) { _bannerServices = bannerServices; _mapper = mapper; }
public BannerController(IBannerServices bannerServices, IHostingEnvironment host) { this.bannerServices = bannerServices; this.host = host; }
/* { * 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(); }
public BannerController(IBannerServices bannerServices) { _bannerServices = bannerServices; }
public HomeController(IHomeService homeService, IBannerServices bannerServices) { _homeService = homeService; _bannerServices = bannerServices; }