/// <summary> /// Getting 2 variants of Parallax components(background image ) /// </summary> /// <returns>Parallax</returns> public IParallax GetParallax() { IMvcContext mvcContext = _mvcContext(); IParallax parallax = mvcContext.GetDataSourceItem <IParallax>(); return(parallax ?? _parallax); }
public BannerRepository(Func <IMvcContext> mvcContext, IParallax parallax, IImageText imageText, IHomepage_Carousels homepage_Carousels, IHero hero) { _imageText = imageText; _parallax = parallax; _mvcContext = mvcContext; _homepage_Carousels = homepage_Carousels; _hero = hero; }
/// <summary> /// Getting 2 variants of Parallax components(background image ) /// </summary> /// <returns>Parallax</returns> public ActionResult Parallax() { IParallax parallax = _bannerRepository.GetParallax(); return(View($"{ViewPath}Banner/Parallax/_Parallax.cshtml", parallax)); }