Skip to content

Instantly share code, notes, and snippets.

@jfbueno
Last active July 18, 2019 19:54
Show Gist options
  • Save jfbueno/1422162c73a74565c9f1879f3a43996d to your computer and use it in GitHub Desktop.
Save jfbueno/1422162c73a74565c9f1879f3a43996d to your computer and use it in GitHub Desktop.
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}";
}
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