Last active
May 11, 2021 16:11
-
-
Save luisdeol/76a740a1ee88c160e2d4584df18c74f9 to your computer and use it in GitHub Desktop.
Artigo LINQ #2: Classe Program
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace ArtigoLinq | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var pessoas = new List<Pessoa> | |
{ | |
new Pessoa("Luis Dev", "123.456.789-10", new List<string> { "luisdev@email.com", "luisdev1992_sk8@email.com" }), | |
new Pessoa("Outro Dev", "987.654.321-99", new List<string> { "outrodev@email.com", "outrodev_csharp_s2@email.com" }), | |
new Pessoa("Um Último Dev", "321.654.987-44", new List<string> { "ultimo_dev@email.com" }) | |
}; | |
var emails = pessoas.SelectMany(p => p.Emails).ToList(); | |
var emailService = new EmailService(); | |
emailService.BatchSend(emails); | |
Console.ReadLine(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment