public IActionResult Index() { List <Badge> badges = _badgeService.GetBadges(); //Badge badge = new Badge //{ // Title = "Over archivement", // Label = "Overload these lasts times : 10x more products bought than usual !!!", // Picture = "OverArchivement.png" //}; //badges.Add(badge); //badge = new Badge //{ // Title = "Gost", // Label = "Long time not seen, you moron è_é", // Picture = "gost.png" //}; //badges.Add(badge); //badge = new Badge //{ // Title = "Hardware Buyer", // Label = "What are you gonna do with all these mics ?", // Picture = "hardwareBuyer.png" //}; //badges.Add(badge); return(View(badges)); }
// GET: api/Badges public IEnumerable <BadgeDto> GetBadges() { return(badgeSvc.GetBadges().Select(b => BadgeDto.FromBadge(b))); }
// GET api/Badge public IList <Badge> GetBadges() { return(_badgeService.GetBadges()); }
public IActionResult Index() { List <Badge> badges = _badgeService.GetBadges(); return(View(badges)); }
public void GetAllBadges() { var badges = _badgeService.GetBadges(); CollectionAssert.AreEqual(badges.ToArray(), _badges.ToArray()); }