Last active
July 18, 2019 19:54
-
-
Save jfbueno/1422162c73a74565c9f1879f3a43996d to your computer and use it in GitHub Desktop.
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
class Compra | |
{ | |
public string Cliente { get; set; } | |
public decimal Valor { get; set; } | |
public DateTime Data { get; set; } | |
public override string ToString() => $"{Cliente}, com valor de {Valor:n2} em {Data:dd/MM}"; | |
} |
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
IReadOnlyCollection<Compra> Compras => new [] | |
{ | |
new Compra { Valor = 100, Data = new DateTime(2019, 01, 19), Cliente = "Finn" }, | |
new Compra { Valor = 200, Data = new DateTime(2019, 02, 05), Cliente = "Jake" }, | |
new Compra { Valor = 1350, Data = new DateTime(2019, 02, 07), Cliente = "BMO" }, | |
new Compra { Valor = 900, Data = new DateTime(2019, 01, 21), Cliente = "Finn" }, | |
new Compra { Valor = 150, Data = new DateTime(2019, 02, 05), Cliente = "Jake" }, | |
new Compra { Valor = 1500, Data = new DateTime(2019, 02, 09), Cliente = "Finn" }, | |
new Compra { Valor = 300, Data = new DateTime(2019, 03, 10), Cliente = "Marceline" }, | |
new Compra { Valor = 1200, Data = new DateTime(2019, 03, 15), Cliente = "Marceline" }, | |
new Compra { Valor = 1900, Data = new DateTime(2019, 01, 10), Cliente = "Marceline" }, | |
new Compra { Valor = 2500, Data = new DateTime(2019, 03, 18), Cliente = "Finn" } | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment