Exemplo n.º 1
0
        static DemoController()
        {
            Items = new List<DemoItem>();
            var random = new Random();
            for (var x = 0; x < 10; x++)
            {
                var item = new DemoItem {Number = random.Next(1, 100)};
                item.Text = string.Format("Generated text {0}", item.Number);
                Items.Add(item);

            }
        }
 private static void WriteDemoItem(DemoItem item, TextWriter writer)
 {
     writer.WriteLine("\"{0}\",{1},\"{2}\"", item.Id, item.Number, item.Text);
 }