Example #1
0
 public async Task InsertEmail(tbl_Emails model)
 {
     try
     {
         model.ID = Guid.NewGuid();
         db.tbl_Emails.Add(model);
         await db.SaveChangesAsync();
     }
     catch (Exception ex)
     {
         return;
     }
 }
Example #2
0
        public async Task Receive(EmailModel model)
        {
            try
            {
                var email = new tbl_Emails
                {
                    Date    = model.Date,
                    From    = model.From.Text,
                    To      = model.To.Text,
                    Text    = model.Text,
                    Html    = model.TextAsHtml,
                    Subject = model.Subject
                };

                await dao.InsertEmail(email);
            }
            catch (Exception ex)
            {
            }
        }