Skip to content

Instantly share code, notes, and snippets.

@ChiiAyano
Created December 23, 2014 12:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChiiAyano/04c5057206390931b12c to your computer and use it in GitHub Desktop.
Save ChiiAyano/04c5057206390931b12c to your computer and use it in GitHub Desktop.
これじゃダメだわな
public static IEnumerable<HogeCategory> CreateDummyCategories()
{
var result = Enumerable.Range(0, 5)
.Select(s => new HogeItemCategory
{
Name = string.Format("Dummy {0:00}", s),
Items = Enumerable.Range(1, 10)
.Select(t => new HogeItem
{
ID = (10 * s) + t,
Title = string.Format("Item {0:00}", t),
Price = t * 500,
ImagePath = string.Empty,
Count = t
})
});
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment