public Mail[] GetEmails() { Library.WriteLine("Buscando Email.."); _repo = new MailRepository(); Mail[] mail = null; try { mail = _repo.Select(null, new string[] { @" IsNull(hasSent,'') = '' " }); } catch (Exception exception) { Library.WriteErrorLog(exception); Library.WriteLine("Error query select"); } finally { _timer.Start(); } if (mail == null) { Console.WriteLine("Sin email para enviar"); Library.WriteLine("Sin email para enviar"); _timer.Start(); return(null); } Library.WriteLine("Se encontraron " + mail.Count() + " para enviar."); return(mail); }