private static void SaveResultToDatabase(EmailMessage message) { using (var ctx = new DbMailRepository()) { ctx.SaveMessage(message); } }
private void GetReceivedUids(EmailData account) { using (var ctx = new DbMailRepository()) { _receivedMessagesUids = ctx.GetReceivedUidsOnDate(account.InquireDate, account.Email) ?? new List <string>(); } }
static void Main(string[] args) { var mailrepo = new DbMailRepository(); var all = mailrepo.GetNotCheckedEmailsAsync().Result; }