public IViewModel Build(BannerRequest req) { var topBanners = _bannerRepo.GetAllBanners($"Product-TopBanner"); topBanners = FilterTopBanner(topBanners, req); var bottomBanners = _bannerRepo.GetAllBanners("Product-BottomBanner"); bottomBanners = FilterBottomBanner(bottomBanners, req); return(new ProductBannerViewModel() { TopBanners = topBanners.Cast <ProductTopBanner>(), BottomBanners = bottomBanners.Cast <ProductBottomBanner>() }); }
public IViewModel Build(BannerRequest req) { var banners = _bannerRepo.GetAllBanners("HeroBannerId"); banners = FilterBanners(banners, req); return(new HeroBannerViewModel() { Banners = banners.Cast <HeroBannerViewModel>() }); }