public static IEnumerable <ProductOrderCharm> GetProductOrderCharms(int count) { var index = 1; var result = CharmFactory.GetCharms(count) .Select(s => new ProductOrderCharm(s, index++)); return(result); }
public static IEnumerable <CharmCategory> GetCharmCategoriesWithCharms(int categories, int charmsInCategory) { var charmCategories = new List <CharmCategory>(); for (var i = 0; i < categories; i++) { var charmCategory = new CharmCategory($"Charm Category {i}", $"Charm Category {i}"); charmCategory.AddCharms(CharmFactory.GetCharms(charmsInCategory)); charmCategories.Add(charmCategory); } return(charmCategories); }
public static ProductOrderCharm GetProductOrderCharm() => new ProductOrderCharm(CharmFactory.GetCharm(), 1);