Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.