Last active
January 24, 2019 20:46
-
-
Save EdCharbeneau/3ba66f8488afc973abbf95181969c1b7 to your computer and use it in GitHub Desktop.
Quick C# data for testing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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