コード例 #1
0
        public List <Partner> GetPartnerLogos(HttpContext context)
        {
            var affiliate = context.Session.GetString(_configuration["AffiliateKey"]);

            if (affiliate != null)
            {
                var data = _partnerRepository.GetAllNotIgnored(affiliate).OrderBy(x => Guid.NewGuid()).Take(6).ToList();
                return(data);
            }
            return(_partnerRepository.ListAll().OrderBy(x => Guid.NewGuid()).Take(6).ToList());
        }
コード例 #2
0
        public IActionResult Partners()
        {
            var model = _partnerRepository.ListAll();

            return(View(model));
        }