Skip to content

Instantly share code, notes, and snippets.

@EdCharbeneau
Last active January 24, 2019 20:46
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 EdCharbeneau/3ba66f8488afc973abbf95181969c1b7 to your computer and use it in GitHub Desktop.
Save EdCharbeneau/3ba66f8488afc973abbf95181969c1b7 to your computer and use it in GitHub Desktop.
Quick C# data for testing
@functions {
public class OrderViewModel
{
public int OrderID { get; set; }
public decimal? Freight { get; set; }
public DateTime? OrderDate { get; set; }
public string ShipCity { get; set; }
public string ShipName { get; set; }
}
// Generate data
IEnumerable<OrderViewModel> data => Enumerable.Range(0, 50).Select(i => new OrderViewModel
{
OrderID = i,
Freight = i * 10,
OrderDate = new DateTime(2016, 9, 15).AddDays(i % 7),
ShipName = "ShipName " + i,
ShipCity = "ShipCity " + i
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment